PPS Practical 11
- Aim: Write a C program to check whether the entered character is capital, small letter, digit or any special character.
- Code:
//For turbo C++ remove below comments #include <stdio.h> //#include<conio.h> #include<ctype.h> void main() { char c; // clrscr(); printf("Enter Character : \n"); scanf("%c",&c); if(isupper(c)){ printf("Entered character is in capital letter"); }else if(islower(c)){ printf("Entered character is in small letter"); }else if(isdigit(c)){ printf("Entered character is digit"); }else{ printf("Entered character is special character"); } // getch(); }
- Output:

Comments
Post a Comment