Home  >  Article  >  Backend Development  >  What is the function name for text output in C language?

What is the function name for text output in C language?

烟雨青岚
烟雨青岚Original
2020-07-02 10:51:414130browse

The function name of text output in C language is printf. The syntax of the printf function is "printf ("format control string", output list)"; the function of this function is to output the contents of the "output list" according to the format specified by the "format control string". The format control string can be represented by the format character It consists of both string and unformatted string.

What is the function name for text output in C language?

#The function name for text output in C language is printf.

1. Calling format of printf function

The printf function format output function is the most frequently used output function in C language. Compared with the putchar function, its function is very powerful. The calling format of the printf function is as follows:

printf("format control string", output list)

Format description:

1), the function of this function is according to the "format Control string" specifies the format and outputs the contents in the "output list".

2), format control string is used to specify the output format. The format control string can be composed of format string and non-format string. The format string starts with % and is followed by various format characters to describe the type, form, length, decimal places, etc. of the output data. For example, "%d" means output in decimal format, etc. Non-formatted strings are printed as they are when output and serve as prompts in the display.

3). Each output item is given in the output list. It is required that the format string and each output item should correspond one-to-one in quantity and type.

What is the function name for text output in C language?

Recommended tutorial: "C Language"

The above is the detailed content of What is the function name for text output 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