c check if character is a space
char ch = ' '; if(isspace(ch)) printf("space"); else printf("other symbol" ); //output: space CCopy
Source: iq.opengenus.org
char ch = ' '; if(isspace(ch)) printf("space"); else printf("other symbol" ); //output: space CCopy