Tutorials Point


  Learning C
  C Function References
  C Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     About TP     Advertising  

C - isspace function

previous

Synopsis:

#include <stdio.h>

int isspace(int c); 

Description:

The function returns nonzero if c is any of:

CR FF HT NL VT space
or 
any other locale-specific space character.

Return Value

The function returns nonzero if c is space otherwise this will return zero which will be equivalent to false.

Example

#include <stdio.h>

int main() {

  if( isspace( ' ' ) )
  {
     printf( "Character  is a space\n" );
  }
  if( isspace( 'A' ) )
  {
     printf( "Character  A is a space\n" );
  }
  return 0;
}

It will proiduce following result:

"Character  is a space


previous Printer Friendly

Advertisements


  

Advertisements