Home > Article > Backend Development > What is the difference between putchar and printf
Difference: The putchar() function can only output a single character, while the printf() function can output various types of data, such as character, floating point, and integer types; "printf("%c", 'A')" is equivalent to "putchar('A')". If you only want to output one character, putchar() is better to use.
The operating environment of this tutorial: windows7 system, c99 version, Dell G3 computer.
In C language, there are three functions that can be used to output data on the display. They are:
such as
printf("%c ",'A')
is equivalent to putchar('A')
;For more computer programming related knowledge, please visit:
The above is the detailed content of What is the difference between putchar and printf. For more information, please follow other related articles on the PHP Chinese website!