Purpose of the getchar() with example in C.

• This function is used to get a character from standard input i.e. Keyboard.
• On successful execution, it returns character read.
• The prototype of this function is in the header file stdio.h.
• Syntax
int getchar (void);
• Example
ch = getchar();

No comments:

Post a Comment