C examples for Data Type:char
As long as the value fits into the range for type char with your compiler, you can use int value to initialize a char type variable.
#include <stdio.h> int main(void) { char letter = 74; // ASCII code for the letter J //from w w w . j a va2s. c om printf("The character is %c\n", letter); printf("%d",letter); return 0; }