Question: write a C language function(use malloc): void embiggen( double * * ar, unsigned * els, unsigned newEls);On entry, ar is the address of a pointer

write a C language function(use malloc): void embiggen( double * * ar, unsigned * els, unsigned newEls);On entry, ar is the address of a pointer to a DA array of doubles containing *els elements. (As usual, awc that *els > 0) awc that newEls > *els.embiggen's job is to change *ar and *els so that *els is increased to newEls, and *ar now points to a larger DA array one with newEls elements.The old values if the small DA array are kept, and the remaining values of the new DA array are set to 0. Naturually, embiggen takes care of deallocating the old, small array.For example, if *ar pointed to an array holding {1.1, 2.2, 3.3}, *els held 3, then callingembiggen(ar, els, 5)would change *ar so that it now points to a DA array holding {1.1, 2.2, 3.3, 0, 0}, and change *els so that it's now 5.

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!