Any Character is entered through the keyboard, write a program to determine whether the character entered is capital letter, small letter, a digit or a special symbol using ASCII values and built-in functions
This is the c source code for: Any Character is entered through the keyboard, write a program to determine whether the character entered is capital letter, small letter, a digit or a special symbol using ASCII values and built-in functions
The Following table shows the range of ASCII values
Characters ASCII Values
A-Z 65-90
a-z 97-122
0-9 48-57
Special symbols 0-47, 48-64, 91-96, 123-127
/* a program to determine whether the character is capital or small */
#include <stdio.h>
#include <conio.h>
void main()
{
char ch;
int in;
printf(“Enter the character: “);
scanf(“%c”,&ch);
in=ch;
if (in>=65 && in<=90)
{
printf(“The character is capital”);
}
else if(in>=97 && in<=122)
printf(“The character is small”);
else if(in>=48 && in<=57)
printf(“The enter value is number”);
else if((in>=0 && in<=47) || (in>=48 && in<=64) || (in>=91 && in<=96) || (in>=123 && in<=127))
printf(“The enter value is special symbol”);
getch();
}
Comments (4)
I have јoined your rss feed and loοk foгward
to seеking mоre of your magnificent post. Also, I have shаred yоur site іn mу socіal networks!