Find ASCII value of a given character

C Program to find ASCII value of a character

/* Source code to find ASCII value of a character entered by user */
#include
int main()
{
char c;
printf(“Enter a character: “);
scanf(“%c”,&c); /* Takes a character from user */
printf(“ASCII value of %c = %d”,c,c);
return 0;
}

 

Comments

comments

Leave a Reply

Your email address will not be published. Required fields are marked *