C iscntrl function

« Previous

Synopsis:

Example

#include <stdio.h>
int iscntrl(int c); 

Description:

The function returns nonzero if c is any of:

Example

BEL BS CR FF HT NL VT

Return Value

The function returns nonzero if c is control chracter line new line, back space etc. otherwise this will return zero which will be equivalent to false.

Example

Example

#include <stdio.h>
int main() {
  if( iscntrl( 'a' ) )
  {
     printf( "Character a is not control character\n" );
  }
  if( iscntrl( '\n' ) )
  {
     printf( "Character \n is control chracter\n" );
  }
  return 0;
}

Output Will Be :

Output

Character \n is control chracter


« Previous
Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!