#include <stdio.h> |
int main ( void ) |
{ |
char ch; |
/* prompt the user for input */ |
printf ( "Enter a character followed by \ |
<Enter>: " ); |
/* read the character from stdin */ |
ch = fgetchar(); |
/* display what was read */ |
printf ( "The character read is: '%c'\n" , |
ch ); |
return 0; |
} |