Use the isspace(c) function. Returns TRUE if the character c is a whitespace character.