Published on: 12th Nov 2010 | Last Updated on: 24th Nov 2011
ctype.h (Character Functions header file):
↓↓Download ctype.h Header File
It contains the declarations for character functions i.e. it contains information used by the character classification and character converstion macros.
Some of the standard member functions of ctype.h header files are,
| Function Name | Description |
|---|---|
| isalnum - | checks for alphanumeric character. |
| isalpha - | checks for alphabetic character. |
| isxdigit - | checks for hexadecimal digit. |
| isupper - | checks for upper case character. |
| isspace - | checks for any whitespace character. |
| ispunct - | checks for punctuation character. |
| isdigit - | checks for digits. |
| islower - | checks for lower case characters. |
| isprint - | checks for printable character with space character. |
| isgraph - | checks for graphic character without space character. |
Example :
/* Program to demonstrate ctype.h header file working.
Creation Date : 05 Nov 2010 02:18:12 AM
Author : www.technoexam.com [Technowell, Sangli] */
#include <stdio.h> #include <conio.h> #include <ctype.h> #include <string.h> void main() { int len, i; char *str = "TECHNOEXAM"; clrscr(); len = strlen(str); for(i=1;i<=len;i++) { str[i] = tolower(str[i]); //tolower() } printf("\n\t Using tolower() : %s"<,str); for(i=1;i<=len;i++) { str[i] = toupper(str[i]); //toupper() } printf("\n\n\t Using toupper() : %s",str); getch(); }
Output :
Using tolower() : Technoexam
Using toupper() : TECHNOEXAM_
Link this post on your Blog/Website :

