#include#include int main() { char ch = 'a'; if (std::isalnum(ch)) { std::cout << "The character is alphanumeric."; } else { std::cout << "The character is not alphanumeric."; } return 0; }
#include#include int main() { char ch = 'a'; ch = std::toupper(ch); std::cout << "The uppercase character is " << ch << "."; return 0; }
#includeThese examples use functions from the CCharacter class, which is a part of the C++ Standard Library.#include int main() { char ch = ' '; if (std::isspace(ch)) { std::cout << "The character is a whitespace character."; } else { std::cout << "The character is not a whitespace character."; } return 0; }