English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

How to clear the console in C?

The functionisgraph()Used to check if the passed character has graphical representation. Declared in the "ctype.h" header file.

This isisgraph()C language syntax,

int isgraph(int char);

This isisgraph()C language example,

Example

#include<stdio.h>
#include<ctype.h>
int main() {
   int a = '\n';
   int b = ''8';
   int c = 's';
   if(isgraph(a))
   printf("The character has graphical representation\n");
   else
   printf("The character isn't having graphical representation\n");
   if(isgraph(b))
   printf("The character has graphical representation\n");
   else
   printf("The character isn't having graphical representation\n");
   if(isgraph(c))
   printf("The character has graphical representation\n");
   else
   printf("The character isn't having graphical representation\n");
   return 0;
}

Output result

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. Check whether these variables have graphical representation or not.isgraph()Method.

if(isgraph(a))
printf("The character has graphical representation\n");
else
printf("The character isn't having graphical representation\n");