Hi friends, well... i'm asking for another help from you guys.hope you will...
My friend sent me a email asking why the following code doesn't work properly.I'm also couldn't understand what's happening..When this program run it supposed to prompt two times to enter values.but its actually prompt once. I tried to clean input buffer,but it seems like the same.please anyone can help.I'm sure you guys can..thank you in advanced. i'm running this on ubuntu.
#include<stdio.h>
#include<string.h>
void main()
{
char check[5];
prter:intf("En- ");
scanf("%s",check);
printf("%s\n",check);
printf("%.2s\n",check);
printf("Re-Enter:- ");
fflush(stdin);
gets(check);
printf("%s\n",check);
}