Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char ch;
- int test, i;
- printf("Enter Test Case: ");
- scanf("%d", &test);
- for(i = 0; i< test; i++)
- {
- printf("\nEnter any character: ");
- scanf(" %c", &ch);
- /* Alphabet check */
- if((ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122))
- {
- printf("%c is alphabet.\n", ch);
- }
- /* Digit check */
- else if(ch >= 48 && ch <= 57)
- {
- printf("%c is digit.\n", ch);
- }
- /* Special Character check */
- else
- {
- printf("%c is special character.\n", ch);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement