#include <iostream>
#include <cctype>
Go to the source code of this file.
◆ main()
Definition at line 6 of file charfunc.cpp.
7{
9
11 cout <<
a << (isdigit(a) ?
" is " :
" is not ") <<
"a digit" << endl;
13 cout <<
a << (isdigit(a) ?
" is " :
" is not ") <<
"a digit" << endl;
14
16 cout <<
a << (isalpha(a) ?
" is " :
" is not ") <<
"a letter" << endl;
18 cout <<
a << (isalpha(a) ?
" is " :
" is not ") <<
"a letter" << endl;
20 cout <<
a << (isalpha(a) ?
" is " :
" is not ") <<
"a letter" << endl;
21
23 cout <<
a << (islower(a) ?
" is " :
" is not ") <<
"a lowercase letter" << endl;
25 cout <<
a << (islower(a) ?
" is " :
" is not ") <<
"a lowercase letter" << endl;
27 cout <<
a << (islower(a) ?
" is " :
" is not ") <<
"a lowercase letter" << endl;
28
30 cout <<
a << (isupper(a) ?
" is " :
" is not ") <<
"an uppercase letter" << endl;
32 cout <<
a << (isupper(a) ?
" is " :
" is not ") <<
"an uppercase letter" << endl;
34 cout <<
a << (isupper(a) ?
" is " :
" is not ") <<
"an uppercase letter" << endl;
35
36 return 0;
37}