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

What does putchar function mean in C language

王林
Release: 2020-07-08 14:18:26
Original
19088 people have browsed it

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);
Copy after login

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’); /*换行*/
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template