Question is :- Any char is inter thorugh keyboard ,write a pgm to determine whether the char is enter is capital , small case letter, digit or a symbol.
NOTE:- using logical operators only or conditional operators
i wrote a pgm for that... and there is one error..and one
warning and even i do not know..the pgm is correct or not... please check and help me.
here is the code..
Please help.Code:#include <stdlib.h> #include <conio.h> #include <ctype.h> #include <stdio.h> main() { char a; printf(" Enter Any Char in Capital or small case or any digit or any number"); scanf("%c",&a); clrscr(); if((a>=65 && a<=90)||(a>=97 && a<=122)) { printf("CapsLock"); /* In this Line i get Error "Expression syntax is in function main() */ } else printf("Small Case letter"); if((a>='0' && a<='9')) printf(" Digit"); if((a>=0 && a<=46 && a>=58 && a<=64 && a>=91 && a<=96 && a>=123 && a<=127)) /* In this line i get warning that " Constant out of range." */ printf("Speical Symbol"); getch(); }