Find the ASCII value of the given character,ASCII value of given character,given character ASCII value,character ASCII value,write a program to find the ASCII value of the given character,ASCII value of character,find a character ASCII value
Program to find the ASCII value
This program is for to print the given character (A,B,C..........Z or a,b,c,d,........z) of ASCII value.
#include<stdio.h>
main()
{
char ch;
printf("Enter Character\n");
scanf("%c",&ch);
if((ch> = 'a') && (ch < = 'z') || (ch >= 'A') && (ch <= 'Z'))
printf("%d\n",ch);
}
Output:-
Enter character
a
97
Program to find the ASCII value
This program is for to print the given character (A,B,C..........Z or a,b,c,d,........z) of ASCII value.
#include<stdio.h>
main()
{
char ch;
printf("Enter Character\n");
scanf("%c",&ch);
if((ch> = 'a') && (ch < = 'z') || (ch >= 'A') && (ch <= 'Z'))
printf("%d\n",ch);
}
Output:-
Enter character
a
97
0 comments:
Post a Comment