There are various character handling functions in C++ which provide facility to handle character in different ways.
C++ provides #include<ctype.h> header file for character handling.
All character functions have defined in #include<ctype.h> header file . “ctype” means charater type.
Character Functions
- isalnum() :- This function is used to check whether a character is a letter or a digit i.e alphanumeric or not.
- syntax isalnum(ch);
- isdigit():- This function is used to check whether a character is digit or not.
- syntax isdigit(ch);
- isalpha():- This function is used to check whether a character is alphabet or not.
- syntax isalpha(ch);
- islower():- This function is used to check whether a character is lowercase alphabet or not.
- syntax islower(ch);
- isupper():- This function is used to check whether a character is uppercase or not.
- syntax isupper(ch);
- tolower():- This function is used to convert uppercase character to lowercase character.
- syntax tolower(ch);
- toupper():- This function is used to convert lowercase character to uppercase character.
- syntax toupper(ch);
- isspace():- This function is used to check whether a character is white space (blank) or not.
- syntax ispace(ch);
Where ch is a character variable.
Note :
when a character function is used to check the condition then following cases may occur.
case 1: If condition is true then returns nonzero value.
case 2: If condition is false then returns zero.
Q.Write a program to represent isalnum( ) OR Write a program to check input character is alphabet numeric or not.
12th Computer Science Important Program
C++ Programming
C++ Programming Language Tutorial
Translators in Programming languages
Tokens in C++ Programming Language
Operators in C++ Programming Language
Conditional statements in C++ Language
Switch Statement in C++ Language
Loops / Iteration statement in C++ Language
Jump statements in C++ with best example
Arrays in C++ Programming Language
Functions in C++ Programming Language
Passing Arguments in Functions
Method / Function overloading in C++
String Functions in C++ with Example
Boolean Algebra
Introduction to Boolean Algebra- Best concepts
Important Law of Boolean algebra with Best concepts
Logic Gates and their types -Best Concept
De Morgan’s Law and their Applications
Applications of Boolean Algebra in Computer Science
DBMS
Introduction to DBMS | Database Management System
Communication and Network Concept
Introduction to Communication and Networks