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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!