Description:
This program in used to print the ASCII value of any character entered by user.For eg. if we Enter 'A' then it will print 65.
Program:
#include<stdio.h>
#include<conio.h>
main()
{
int i;
char c;
clrscr();
printf(" Enter any character: ");
scanf("%c",&c);
printf("\n ASCII value of %c is %d",c,c);
getch();
}
This program in used to print the ASCII value of any character entered by user.For eg. if we Enter 'A' then it will print 65.
Program:
#include<stdio.h>
#include<conio.h>
main()
{
int i;
char c;
clrscr();
printf(" Enter any character: ");
scanf("%c",&c);
printf("\n ASCII value of %c is %d",c,c);
getch();
}