C Program to Find ASCII Value of a Character

Example
#include <conio.h>

#include <stdio.h>
void main()

{
char c;
printf("Enter a character: ");
scanf("%c", &c);

printf("ASCII value of %c = %d", c, c);        // %d displays the integer value of a character & %c displays the character

getch();
}
Program Output

  Enter a character: h
  ASCII value of h = 104