Write a program to accept a character and determine whether it is an alphabet, character or special symbol

Spread the love

/********* Program **********/


        char ch;
        printf(“Enter character to test :”);
        scanf(” %c”,&ch);

        if(isalpha(ch))  //is alpha available in ctype.h
             printf(“%c is alphabet..n”,ch);
        else if(isdigit(ch))
             printf(“%c is Digit..n”,ch);
         printf(“%c is special symbol..n “,ch);


/********* OUTPUT *********/

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply