C Program for ASCII value of a character
For example, ASCII value of 'A' is 65.
What this means is that, if you assign 'A' to a character variable, 65 is stored in that variable rather than 'A' itself.
Program to Print ASCII Value
#include <stdio.h>
void main()
{
char c;
printf("Enter a character: ");
scanf("%c", &c);
printf("ASCII value of %c = %d", c, c);
}
Leave a Comment