Program to print ASCII value of character:
#include<stdio.h>
void main()
{
char ch;
printf("Enter the character: ");
scanf("%c", &ch);
//To print ascii value of character... just we need to print it an intiger format
printf("ASCII value of character %c is %d", ch,ch);
}
Above program shows the following output:
Enter the character: A
ASCII value of character A is 65
No comments:
Post a Comment
If you have any doubts, please discuss here...👇