GTU PPS Program - 11
11. Write a C program to check whether the entered character is capital, small letter, digit or any special character. #include<stdio.h> #include<conio.h> int main() { char ch; printf("\nPress any key : "); ch=getchar(); if(ch>='A' && ch<='Z') printf("\nentered character is capital letter"); else if(ch>='a'&& ch<='z') printf("\nEntered character is small letter"); else if(ch>='0'&& ch<='9') printf("\nEntered character is digit"); else printf("\nEntered character is special character"); getch(); return 0; } Sample output Previous Program Next Program
Comments