Home >Backend Development >C#.Net Tutorial >What does putchar function mean in C language

What does putchar function mean in C language

王林
王林Original
2020-07-08 14:18:2619074browse

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.

What does putchar function mean in C language

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn