C Language Example - Output a Single Character

C Language Examples

Usageprintf()and%cFormatted output of a character.

Example

#include <stdio.h> int main() { char c; // Declare a char variable c = 'A'; // Define a char variable printf("The value of c is %c", c); return 0; }

Output result:

c 的值为 A

C Language Examples

other extensions