Program to Find Character Group using ASCII And Conditional Operator.


#include
main()
{
char charac;


printf("Enter the character to be Find:");
scanf("%c", &charac);

((charac>=97) && (charac<=122))?(printf("\nLower Case")):(printf("\nNot a Lower Case character"));

/*For detection of Special Symbols*/

(((charac>=0) && (charac<=47)) || ((charac>=58) && (charac<=64))|| ((charac>=91) && (charac<=96))|| ((charac>=123) && (charac<=127)))? (printf("\nSpecial Symbol")):(printf("\nNot a Special Symbol"));

}







No comments:

Post a Comment