3 ms·
You'd need it to read words, unless you're using a libc function that does the allocation for you. (Not that you actually need a full string, realloc works just
by saagarjha 6y ago
You'd need it to read words, unless you're using a libc function that does the allocation for you. (Not that you actually need a full string, realloc works just fine for the code I'm writing.)
- tptacek 6y agoYeah, I just used strdup and strsep, like a C programmer. You don't need a dynamic string to count words. :P