These functions are defined in the header file of cctype.
Isalnum (c) true if C is a letter or number
Isalpha (c) returns true if C is a letter
Iscntrl (c) returns true if C is a control character
Isdigit (c) returns true if C is a number
Isgraph (c) returns true if C is not a space but can be printed.
Islower (c) returns true if C is lower case
Isprint (c) is printable and returns true
Ispunct (c) returns true if C is a punctuation character
Isspace (c) returns true if C is a blank character
Isupper (c) returns true if it is an uppercase character
Isxdigit (c) returns true if C is a hexadecimal number.
If tolower (c) is in upper case, convert it to lower case
If toupper (c) is in lower case, convert it to upper case
# Include <iostream> # include <string> # include <cctype> using namespace STD; int main () {string S = "aeld2o";/* For (string :: size_type I = 0; I <S. size (); I ++) {If (s [I]> '0' & S [I] <'9 ') {cout <"Number" <Endl; break ;}}for (string: size_type I = 0; I <S. length (); I ++) {If (isalnum (s [I]) {cout <s [I] <Endl ;}for (string :: size_type J = 0; j <S. size (); j ++) {If (isalpha (s [J]) {cout <s [J] <"" ;}} cout <Endl; for (string: size_type z = 0; Z <S. size (); Z ++) {If (isdigit (s [Z]) {cout <s [Z] <"" ;}} cout <Endl; for (string: size_type K = 0; k <S. size (); k ++) {If (isalpha (s [k]) {cout <(char) toupper (s [k]) <"";}} cout <Endl; return 0 ;}