Hi Im new here and just learning C. Im using VTC video tutorials. The guy on it is saying that I have to put in fflush(stdin); to keep the window open so it dosent automatically close.
here is the code I was supposed to put it into.
I was supposed to put it above getchar();
printf ("How old are you: ");
scanf ("%d", &age);
printf ("The age you have entered is %d\n", age);
But I put getch(); and it didnt close the window, so is getch();
an exceptable replacement for using fflush(stdin); ?