Home > Article > Backend Development > What is the output statement in C language?
#The output statement in C language is the printf function. The printf function is called the format output function, and its function prototype is in the header file "stdio.h".
The general form of the printf function call is:
printf(“格式控制字符串”, 输出表列)
The printf function double quotes include three characters:
(1) Format control characters starting with %
(2) Escape characters starting with \
(3) Ordinary characters
Example:
/*基础篇 2_1:printf的使用*/ #include <stdio.h> main() { int a; //整型 %d long b; //长整型 %d float c; //浮点型 %f double d; //双精度浮点型 %lf a = 500; b = 14758968; c = 3.1; d = 2.5E10; printf("%d\n", a); printf("%d\n", b); printf("%f\n", c); printf("%lf\n", d); getchar(); }
Recommended: "c language tutorial》
The above is the detailed content of What is the output statement in C language?. For more information, please follow other related articles on the PHP Chinese website!