isgraph() C library function Last Updated : 24 Oct, 2017 Comments Improve Suggest changes Like Article Like Report The C library function isgraph() checks whether a character is a graphic character or not. Characters that have graphical representation are known are graphic characters. For example: ':' ';' '?' '@' etc. Syntax - #include <ctype.h> int isgraph(int ch); Return Value - function returns nonzero if ch is any printable character other than a space, else it returns 0. For ASCII environments, printable characters are in the range of 0X21 through 0X7E. Code - CPP // code to check graphical character #include <stdio.h> #include <ctype.h> int main() { char var1 = 'g'; char var2 = ' '; char var3 = '1'; if (isgraph(var1)) printf("var1 = |%c| can be printed\n", var1); else printf("var1 = |%c| can't be printed\n", var1); if (isgraph(var2)) printf("var2 = |%c| can be printed\n", var2); else printf("var2 = |%c| can't be printed\n", var2); if (isgraph(var3)) printf("var3 = |%c| can be printed\n", var3); else printf("var3 = |%c| can't be printed\n", var3); return (0); } Output - var1 = |g| can be printed var2 = | | can't be printed var3 = |1| can be printed Code - CPP // code to print all Graphical Characters #include <stdio.h> #include <ctype.h> int main() { int i; printf("In C programming All graphic " "characters are: \n"); for (i = 0; i <= 127; ++i) if (isgraph(i) != 0) printf("%c ", i); return 0; } Output - In C programming All graphic characters are: ! " # $ % & ' ( ) * +, - . / 0 1 2 3 4 5 6 7 8 9 : ; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ Comment More infoAdvertise with us Next Article isgraph() C library function S Shivani Ghughtyal Improve Article Tags : C Language DSA C-Library Similar Reads C Library math.h Functions The math.h header defines various C mathematical functions and one macro. All the functions available in this library take double as an argument and return double as the result. Let us discuss some important C math functions one by one. C Math Functions1. double ceil (double x) The C library functio 6 min read strcmpi() function in C The strcmpi() function is a built-in function in C and is defined in the "string.h" header file. The strcmpi() function is same as that of the strcmp() function but the only difference is that strcmpi() function is not case sensitive and on the other hand strcmp() function is the case sensitive. Sy 2 min read Functions in C++ A function is a building block of C++ programs that contains a set of statements which are executed when the functions is called. It can take some input data, performs the given task, and return some result. A function can be called from anywhere in the program and any number of times increasing the 9 min read strlen() function in c The strlen() function in C calculates the length of a given string. The strlen() function is defined in string.h header file. It doesn't count the null character '\0'. Syntax of C strlen() The syntax of strlen() function in C is as follows: size_t strlen(const char* str);Parameters The strlen() func 1 min read strrev() function in C The strrev() function is a built-in function in C and is defined in string.h header file. The strrev() function is used to reverse the given string. Syntax:char *strrev(char *str);Parameter:str: The given string which is needed to be reversed.Returns: This function doesn't return anything but the re 2 min read Like