SyntaxFix
Write A Post
Hire A Developer
Questions
If you just want to print the substrings ...
char s[] = "THESTRINGHASNOSPACES"; size_t i, slen = strlen(s); for (i = 0; i < slen; i += 4) { printf("%.4s\n", s + i); }