Home >Backend Development >C#.Net Tutorial >What does getchar mean in c language
#What does getchar mean in c language?
In C language, the getchar function is a character input function, and putchar represents a single character output function.
Usage of getchar() function: char a=getchar()
.
The function is to input a character from the computer terminal (usually the keyboard). The getchar() function can only receive one character, and its function value is the character obtained from the input device.
Recommendation: "c Language Tutorial"
Related introduction:
The difference between getchar and putchar:
1 . The purpose of the getchar function is to obtain a character and belongs to the reading function (input function). The putchar function outputs a character and belongs to the writing function (output function).
2. The getchar function does not require parameters, and the purchar function requires an integer parameter.
3. In most cases, the getchar function needs to save its return value for subsequent use. The putchar function does not need to care about its return value except to determine whether it is successful.
The above is the detailed content of What does getchar mean in c language. For more information, please follow other related articles on the PHP Chinese website!