Easy Tutorial
❮ C Standard Library Stddef H C Function Strcoll ❯

C Language Example - Output a Single Character

C Language Examples

Using printf() with %c to format and output a single character.

Example

#include <stdio.h>

int main() {
   char c;        // Declare char variable

   c = 'A';       // Define char variable

   printf("The value of c is %c", c);

   return 0;
}

Output:

The value of c is A

C Language Examples

❮ C Standard Library Stddef H C Function Strcoll ❯