Write a c program to print ascii value of an entered character
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Enter the character: ");
scanf("%c",&ch);
printf("ASCII value of %c=%d",ch,ch);
getch();
}
Output:
Enter the character: A
ASCII value of A=65
No comments: