Hi All,

The FAQ say to not use:
Code:
flushall();
Because of an unexpected behavior.
I still don't understand how can I run the following code without this command

Code:
int main(void)
{
  int a;
  char buf[20];

  puts("Put a number:");
  scanf("%d",&a);
  fgets(buf,20,stdin);
  return 0;
}
Thank you