C examples for Data Type:char
Use getchar() function to read a single character from key board
#include <stdio.h> int main()/*from w ww . j a va 2s . c om*/ { char key; puts("Type your favorite keyboard character:"); key=getchar(); printf("Your favorite character is %c!\n",key); return(0); }