Question: (programming C++) Specifically, I am not allowed to include string, cstdlib or math libraries. Also, I am not allowed to use any built-in functions of
(programming C++) Specifically, I am not allowed to include string, cstdlib or math libraries. Also, I am not allowed to use any built-in functions of c-strings.
char* zigzagMerge(const char *s1, const char* s2)
{
/* create and return a new c-string by merging (putting in one) s1 and s2 in zigzag form.
Example, zigzagMerge of "abc" and "defgh" will be "adbecfgh"
*/
}
//Test zigzagMerge function
cout << endl;
char *s3 = zigzagMerge(s1, s2);
cout << "The zigzag merge of " << s1 << " and " << s2 << " is " << s3 << endl;
Here is the ideal output:
The zigzag merge of massachussettes and abmaachu is maabsmsaaacchhuussettes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
