Categories
Input and Output

Print Characters

#include <stdio.h>
int main()
{
    char chr = 'a';    
    printf("character = %c", chr);  
    return 0;
} 

Output

character = a

To print char, we use %c format specifier.

Leave a Reply

Your email address will not be published. Required fields are marked *