Given a character, display the ascii value of the char.

  #include <stdio.h>

int main(void)
{
char ch;

printf("\nEnter a character : ");
scanf("%c", &ch);

printf("\nCharacter = %c ASCII Value = %d", ch, ch);

return 0;
}