I am trying to figure out how to check if a character is equal to white-space in C. I know that tabs are \'\\t\' and newlines are \'\\n\', but I wa
\'\\t\'
\'\\n\'
#include main() { int c,sp,tb,nl; sp = 0; tb = 0; nl = 0; while((c = getchar()) != EOF) { switch( c ) { case ' ': ++sp; printf("space:%d\n", sp); break; case '\t': ++tb; printf("tab:%d\n", tb); break; case '\n': ++nl; printf("new line:%d\n", nl); break; } } }