void setup () {
Serial.begin(9600);
//1. isdigit(parameters is of chracter datattype)
//2. isalpha(parameters is of chracter datattype)
//3. isalnum(parameters is of chracter datattype)
//4. isxdigit(parameters is of chracter datattype)
//5. islower(parameters should be of chracter datatype)
//6. isupper(parameters should be of chracter datatype)
//7. isspace(chracter type)
//true '\n', ' ', '\f', '\r','\t','\v'
//8. iscntrl(parameter passed should be chracter type)
//true '\n','\f','\r','\t','\v','\a\','\b'
if(iscntrl('\n'))
{
Serial.println("True");
}
else
{
Serial.println("False");
}
}
void loop () {
}
/*
//parameters is chracter
//7.isspace( '\r' ) Returns 1 if c is a white-space characternewline ('\n'),
//space (' '), form feed ('\f'), carriage return ('\r'),
//horizontal tab ('\t'), or vertical tab ('\v')and 0 otherwise.
Serial.println("7");
if(isspace( '\r' )){Serial.println("True");}else{Serial.println("False");}
//8. int iscntrl( int c ) Returns 1 if c is a control character,
//such as newline ('\n'), form feed ('\f'), carriage return ('\r'),
//horizontal tab ('\t'), vertical tab ('\v'), alert ('\a'),
//or backspace ('\b')and 0 otherwise for $.
Serial.println("8");
if(iscntrl( '$' )){Serial.println("True");}else{Serial.println("False");}
//9. int ispunct( int c ) Returns 1 if c is a printing character other
// than a space, a digit, or a letter and 0 otherwise.
//Analyze if a char is punctuation (that is a comma, a semicolon,
//an exclamation mark and so on). Returns true if the input char is punctuation.
//;,Y,#
Serial.println("9");
if(ispunct( ',' )){Serial.println("True");}else{Serial.println("False");}
//10 int isprint( int c ) Returns 1 if c is a printing character
//including space (' ') and 0 otherwise.
//$,\a,' ',\r
Serial.println("10");
if(isprint('$' )){Serial.println("True");}else{Serial.println("False");}
//11.int isgraph( int c ) Returns 1 if c is a printing character other
//than space (' ') and 0 otherwise.
//Q,A,' '
Serial.println("11");
if(isgraph ('Q')){Serial.println("True");}else{Serial.println("False");}
*/