How to represent a single character output in the C language?
In C language, character variables can be used to represent individual characters. The type of character variables is char, and single characters can be represented using single quotes ‘ ‘.
Here are some examples:
char ch1 = 'A';
char ch2 = '1';
char ch3 = '!';
You can use the printf function to display character variables. The format is %c.
printf("%c\n", ch1);
printf("%c\n", ch2);
printf("%c\n", ch3);
The output results are:
A
1
!