Read a char from console: getchar()
#include <stdio.h> int main(void) { char ch; ch = getchar(); /* read a char */ printf("What you typed: %c", ch); return 0; }