Program which will display the ascii value of the character variable | SpiderShell
![]() |
| Program which will display the ascii value of the character variable | SpiderShell |
Program :
#include <stdio.h>
int main()
{
char ch;
printf("Enter a character : ");
scanf("%c",&ch);
printf(" The ascii value of the character variable is : %d", ch);
return 0;
}
Output :
Enter a character : b
The ascii value of the character variable is : 98

0 Comments:
Post a Comment