Copyright © tutorialspoint.com

C - isprint function

previous

Synopsis:

#include <stdio.h>

int isprint(int c); 

Description:

The function returns nonzero if c is space or a character for which isgraph returns nonzero.

Return Value

The function returns nonzero if c is space or a character for which isgraph returns nonzero.

Example

#include <stdio.h>

int main() {

  if( isprint( ';' ) )
  {
     printf( "Character ; is here\n" );
  }
  if( isprint( 'A' ) )
  {
     printf( "Character A is here\n" );
  }
  return 0;
}

It will proiduce following result:

Character ; is here
Character A is here

previous

Copyright © tutorialspoint.com