Learning C
C Function References
C Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
C - iscntrl function
Synopsis:
#include <stdio.h>
int iscntrl(int c);
|
Description:
The function returns nonzero if c is any of:
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
#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;
}
|
It will proiduce following result:
Character \n is control chracter
|
|
|
|
|