Mega Code Archive

 
Categories / C / Code Snippets
 

Output the chars ASCII code

#include <conio.h> #include <stdio.h> int main(void) { char ch; printf("Enter a char: "); ch = getchar(); printf("\n Its ASCII code is %d", ch); return 0; }