iscntrl

Tests for a control character (function or macro)

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Character Manipulation

Syntax

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

Parameters

c
(IN) Specifies the character to be tested.

Return Values

The iscntrl function or macro returns a nonzero value when the argument is a control character. Otherwise, a value of 0 is returned.

Remarks

A control character is any character whose value is from 0 to 31.

See Also

isalnum, isalpha, isdigit, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper

Example

  #include <ctype.h>  
  #include <stdio.h>  
   
  main ()  
  {  
     printf ("%d %d %d \u", iscntrl (’\u’), iscntrl (’\A’), 
             iscntrl (’f’));  
  }
  

produces the following:

  1 0 1