*Determine whether the character value taken as input is a capital letter,
small letter, digit or special symbol.*/
#include <stdio.h>

int main(void)
{
char ch;

printf( “nEnter a character : ” );
scanf(“%c”, &ch);
if(ch >= ‘A’ && ch <= ‘Z’) /* Capital Letter */
{
printf( “nCapital Letter” );
}
else if(ch >= ‘a’ && ch <= ‘z’) /* Small Letter */
{
printf( “nSmall Letter” );
}
else if(ch >= ‘0’ && ch <= ‘9’) /* Digit */
{
printf( “nDigit” );
}
else
{
printf( “nSpecial Symbol” );
}
return 0;
}

Leave a Reply

Leave a Reply

Your email address will not be published.