C examples for Data Type:int
Displays code number for a character
#include <stdio.h> int main(void){ char ch;// ww w . ja va 2 s.c om printf("Please enter a character.\n"); scanf("%c", &ch); /* user inputs character */ printf("The code for %c is %d.\n", ch, ch); return 0; }