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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started