Let\'s say I have the following code and output:
for (j = 0; j <= i; j++) printf(\"substring %d is %s\\n\", j, sub_str[j]);
You can't compare strings in C with == operator. You need to use strcmp function or strncmp.