|
Description
This illustrates the
getchar( ) function , this gets characters
and echoes them on the screen
Code
/*this shows the
getchar() function*/
#include <stdio.h>
main()
{
int ch;
/*get characters and echo
them to the screen*/
while((ch = getchar()) != '\n')
putchar(ch);
return 0;
}
Information
tested on Visual C++
6
|