How to output a single character in the C language?

In C language, you can use the printf function to display a single character. For example, to output the character A, you can use the following code:

char c = 'A';
printf("%c\n", c);

In the code above, %c is the format specifier for the printf function, used to indicate outputting a character. The variable ‘c’ following %c is the character to be output.

Additionally, you can also use the putchar function to output individual characters. For example:

char c = 'A';
putchar(c);
bannerAds