How do I get my program to wait for a keypress?
What is the function of "fflush ( stdout );" and "clearerr ( in );" in this code?
void myflush ( FILE *in )
ch = fgetc ( in );
while ( ch != EOF && ch != '\n' );
clearerr ( in );
void mypause ( void )
printf ( "Press [Enter] to continue . . ." );
fflush ( stdout );
int main ( void )
// Test with an empty stream
printf ( "Hello, world!\n" );
// Leave extra input in the stream
printf ( "Enter more than one character" );
myflush ( stdin );