Introduction
ctype.h is a header file in the C standard library that provides functions to classify and transform individual characters. These functions can determine whether characters are alphabetic, numeric, or even whitespace, among other categories. With the help of these functions, we can manipulate characters and provide useful information about them. This is very important for parsing text, validating input, and processing strings in numerous C programs.

In this article, we will discuss the functions provided by ctype.h and understand how to use them with the help of examples.
What is <ctype.h>?
<ctype.h> is a header file in the C programming language that provides functions for testing & mapping characters. It allows you to perform various operations on characters, such as checking if a character is an alphabet, digit, lowercase, uppercase, punctuation mark, etc. These functions take a single character as an argument & return a non-zero value (true) if the character satisfies the condition, or zero (false) otherwise.
Some commonly used functions from the <ctype.h> header file are:
- isalpha(c): Checks if the character 'c' is an alphabet (a-z or A-Z).
- isdigit(c): Checks if the character 'c' is a digit (0-9).
- islower(c): Checks if the character 'c' is a lowercase alphabet (a-z).
- isupper(c): Checks if the character 'c' is an uppercase alphabet (A-Z).
- isalnum(c): Checks if the character 'c' is an alphanumeric character (a-z, A-Z, or 0-9).
- isspace(c): Checks if the character 'c' is a white-space character (space, tab, newline, etc.).
- ispunct(c): Checks if the character 'c' is a punctuation mark.
- tolower(c): Converts the character 'c' to lowercase if it is an uppercase alphabet.
- toupper(c): Converts the character 'c' to uppercase if it is a lowercase alphabet.




