Question: Use dynamic arrays to solve this problem. Consider an array 'a' that was created using dynamic memory allocation. Initialize the array with some values. Write

Use dynamic arrays to solve this problem. Consider an array 'a' that was created using dynamic memory allocation. Initialize the array with some values. Write a function called "insert after" that takes the array, its current size, its capacity, a number in the array after which to insert, the actual number to insert and return true or false. The function works by inserting the last parameter after the stated number in the array. If the stated number does not exist in the array, return false. The array should expand in capacity as needed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
