I am trying to write a program to determin if a character entered bykeyboard is a uuper case, lower case, digit or symbol. Someone please point in the wirte direction. Thanx
Printable View
I am trying to write a program to determin if a character entered bykeyboard is a uuper case, lower case, digit or symbol. Someone please point in the wirte direction. Thanx
Characters all have numerical value which are arranged sequentially, so eg, you can test for a lower case letter with
For more info see the ASCII table:Code:if (ch >= '0' && ch <= '9') ...
ASCII Table / Extended ASCII Codes
islower(), isupper(), isdigit(), etc functions are portable