The putchar function represents the string output function in C language. The function of the putchar function is to output a single character on the terminal (display). Function syntax format: [int putchar(int ch)], where ch represents the character content to be output.
The putchar function is a character output function in C language. Its function is to output a single character on the terminal (display).
(Recommended tutorial: C Language Tutorial)
The function prototype is:
int putchar(int ch);
ch represents the character content to be output, and the return value is : If the output is successful, the ASC code of one character is returned. If the output fails, EOF or -1 is returned.
Example:
putchar(‘A’); /*输出大写字母A */ putchar(x); /*输出字符变量x的值*/ putchar(‘\n’); /*换行*/
The above is the detailed content of What does putchar function mean in C language. For more information, please follow other related articles on the PHP Chinese website!