Mega Code Archive

 
Categories / C / Console
 

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; }