Hi I just started learning C programming in gcc compiler on my Debian system. Here is the code
main()
{
fflush( stdin );
int a,b;
scanf("%d,%d",&a,&b);
printf("%d,%d",a,b);
}
The scanf doesn't take input for the second variable. I press 2 and then return key and it displays
root@debian:/home/wis# ./test
2
2,0root@debian:/home/wis#
I have used space and tab key also. Please help me.
fflush( stdin );. Andmain()→int main(void)