Question: Exercise 1. More Pointers Write a C function - merge - that takes an input two sorted arrays (sorted in alpha-numerical order) of strings and

Exercise 1. More Pointers

Write a C function - merge - that takes an input two sorted arrays (sorted in alpha-numerical order) of strings and the number of strings in each array. It then returns a new array containing all strings in sorted (alpha-numeric) order. In the main function, create two arrays different strings of your choice. Note that, nor the arrays nor the strings have to be of the same length. Call the function reverse. Display the strings returned by the function (one on each line).

Example input: {"ab", "ac"} and {"za", "zb", "zzzzc"}

Example output:

ab

ac

za

zb

zzzzc

Write a C function - concat - that takes a 2D array of strings as input (and the number of strings). It then returns a 1D array containing the concatenation of elements in each element of the 2D array with a space separation between each two elements.

For example: {{I, LOVE, CODING}, {THIS, IS, SPARTA}} {I LOVE CODING, THIS IS SPARTA}

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!