- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
isgraph() C library function
The function isgraph() is used to check that the passed character has a graphical representation or not. It is declared in “ctype.h” header file.
Here is the syntax of isgraph() in C language,
int isgraph(int char);
Here is an example of isgraph() in C language,
Example
#include<stdio.h> #include<ctype.h> int main() { int a = '
'; int b = '8'; int c = 's'; if(isgraph(a)) printf("The character has graphical representation
"); else printf("The character isn’t having graphical representation
"); if(isgraph(b)) printf("The character has graphical representation
"); else printf("The character isn’t having graphical representation"); if(isgraph(c)) printf("The character has graphical representation
"); else printf("The character isn’t having graphical representation"); return 0; }
Output
The character isn’t having graphical representation The character has graphical representation The character has graphical representation
In the above program, Three variables are declared and initialized. These variables are checked that they have graphical representation or not using isgraph() function.
if(isgraph(a)) printf("The character has graphical representation
"); else printf("The character isn’t having graphical representation
");
- Related Articles
- IntlChar isgraph() function in PHP
- Difftime() C library function
- Write a C program using time.h library function
- Write a C program demonstrating strlen library function
- How to Use isGraph() in Arduino?
- Write a C program to compare two strings using strncmp library function
- How to call a jQuery library function?
- Write a C program to Reverse a string without using a library function
- Chrono library in C++
- Library in C++ STL?
- Swift Program to Find Largest Set Element Using Library Function
- Swift Program to Find Minimum Set Element Using Library Function
- Advanced C++ with boost library
- C++ Standard Library Header Files
- Converting number of corresponding string without using library function in JavaScript

Advertisements