Question: Question 4: What does the following function do? write a program that use such function with the following list = {2, 4, 5, 6,
Question 4: What does the following function do? write a program that use such function with the following list = {2, 4, 5, 6, 10, 22, 11,55, 66} and index=3, key=33; print the new list. void insert(int a[], int& n, int maxsize, int index, int key) { if (index maxsize-1) { ; for (int i=n; i>index; i--) { a[i] = a[i-1]; } a[index] = key; n++; return; }
Step by Step Solution
3.48 Rating (165 Votes )
There are 3 Steps involved in it
ANSWER This function inserts an element in an array at a specified ... View full answer
Get step-by-step solutions from verified subject matter experts
