To check a space symbol you can use the following approach
if ( c == ' ' ) { /*...*/ }
To check a space and/or a tab symbol (standard blank characters) you can use the following approach
#include <ctype.h>
//...
if ( isblank( c ) ) { /*...*/ }
To check a white space you can use the following approach
#include <ctype.h>
//...
if ( isspace( c ) ) { /*...*/ }