Write a program that takes a character as input and outputs the ASCII value of that character.



#include <stdio.h>
void main ()
{
      char x;
     
      printf("Enter the character:");
      scanf("%c", &x);
     
      printf("\nThe ASCII value of %c is %d\n\n", x, x);  
}

Comments