Question: Given a non-empty string like abc write a function wordExplode that takes this string and writes a new string, result , generated by concatenating the
Given a non-empty string like "abc" write a function wordExplode that takes this string and writes a new string, result, generated by concatenating the substrings of the given string (e.g. the substrings of "abc" are "a", "ab" and "abc" )
wordXplode(result, "abc") puts "aababc" into result wordXplode(result, "Code") puts "CCoCodCode" into result wordXplode(result, "ab") puts "aab" into result
Hint: Think what you want to do on paper before trying to code it in C; the function strncat() may be very useful.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
