C examples for Data Type:char
You can specify the initial value for a variable of type char by a character constant.
A character constant is a character written between single quotes.
Here are some examples:
#include <stdio.h> int main(void) { char letter = 'A'; char digit = '9'; char exclamation = '!'; //www . j a v a 2 s . c o m printf("The character is %c\n", exclamation); return 0; }