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> void main() { char ch; printf("Enter any character="); scanf("%c",&ch); if(ch>='a' && ch<='z') printf("%c is a small letter",ch); else if(ch>='A' && ch<='Z') printf("%c is Capital letter",ch); else if(ch>='0' && ch<='9') printf("%c is a Numeric",ch); else printf("%c is a Special Character",ch); getch(); } #OUTPUT:
Comments
Post a Comment