C Programs
Program to find ASCII Value of a Character
Program to find ASCII Value of a Character
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
printf("\t\tProgram to find ASCII Value of a Character\n\n");
printf("Enter a Character\n ");
scanf("%c",&ch);
printf("ASCII Value of %c is %d \n\n\n", ch,ch);
getch();
}
Output
#include<conio.h>
void main()
{
char ch;
printf("\t\tProgram to find ASCII Value of a Character\n\n");
printf("Enter a Character\n ");
scanf("%c",&ch);
printf("ASCII Value of %c is %d \n\n\n", ch,ch);
getch();
}
Output
Program to find ASCII Value of a Character
Enter a character
A
ASCII Value of A is 65

Post a Comment
0 Comments