Step-by-step explanation:
ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. Basically, ASCII value is the something which computers understand .
C program that asks the user to enter a single character and then outputs the ASCII number of that character :
#include <stdio.h>
#include <string.h>
int main()
{
char Str[10];
int i,length;
printf("Enter the String: ");
scanf("%s", Str);
if(strlen(Str) == 1){
printf(" %c ASCII value is %d",Str[0],Str[0]);
}
else{
printf(" Please enter only single character!! ");
}
return 0;
}