Question: Please complete this code. I have mentioned To do on this code. 1 #include cstadef ? Iinclude andn() i If variables string dynarr = nulptri

1 \#include cstadef ? Iinclude andn() i If variables string" dynarr = nulptri unsigned usersize - e; If get the size for the array from user If validationi fost not exceed 10 ? dexi cout "Enter your desired array size: 7 ; cin s usersize; ) while (usersize >10); 1f tooo: create the dynande netacy string* dynerr * new string: - dyrarr II call the functions pepulate(dyearr, usersize); printFoods (dynarr, usersize) 1f Toop: releose the dynamie netory to avile a meary Jeak: deletell dynarr; dynArr = nullotry 45 II T000: release the dynatic mesory to avoid a memory leak delete[]dynArr;dynArr=nullptr; Wh terminate return o; 49 59 51 58 - ARR-SIzE - a constant unsigned integen containing the size of the array pointed to by arrptri (the number of elements) 7. ARRLSIZE: - a constant unsigned integer containing the size of the array pointed to by "arrptr' (the number of elenents) - output: - N/A 81 82 83. void printfoods(string* arrPtr, const unsigned ARR_SIZE) f 84 // 1000 853
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
