Copyright © tutorialspoint.com

C - isgraph function

previous

Synopsis:

#include <stdio.h>

int isgraph(int c); 

Description:

The function returns nonzero if c is any character for which either isalnum or ispunct returns nonzero.

Return Value

The function returns nonzero if c is any character for which either isalnum or ispunct returns nonzero.

Example

#include <stdio.h>

int main() {

  if( isgraph( '9' ) )
  {
     printf( "Character 9 is a graph\n" );
  }
  if( isgraph( 'A' ) )
  {
     printf( "Character A is graph\n" );
  }
  return 0;
}

It will proiduce following result:

Character 9 is a graph
Character A is graph

previous

Copyright © tutorialspoint.com