Question: Write a function with prototype void slothify ( int * a , const size _ t na , int * b , const size _

Write a function with prototype
void slothify( int * a, const size_t na,
int * b, const size_t nb,
int * c);
that implements the slothify algorithm by combining arrays a and b into array c. Assume
a and b are sorted int arrays containing exactly na and nb elements each, respectively.
Assume c is an int array thats exactly large enough to hold the combined smaller arrays.
Use only pointer arithmetic in your solution; there should be no use of array indexing with
[] anywhere. Do not call any library functions besides the ones weve been using from
stdio.h.
Hint: This function should work regardless of how many elements are in a and b. The last
step in the algorithm may need to copy the remaining elements from either array

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 Programming Questions!