Answer :
#include<stdio.h> //header file contains the function,decleraction and macro defination of key words used in code.
int main ()
{
char a; //adressing the variables
printf("Enter any alphabet or a number you like\t"); //output
scanf("%c",&a); //stores the input from the user
if (a>='a' && a<='z' || a>='A' && a<='Z') //condition
{
printf("%c is an alphabet",a); //output
}
else if (a>='0' && a<='9') //condition
{
printf("%c is number",a); //output
}
else
{
printf("%c is a symbol",a); //output
}
}
Output :
0 Comments