Question: using C++ language Create a program that performs the following functions: 1. A function to insert one value into an array given the position of
using C++ language
Create a program that performs the following functions: 1. A function to insert one value into an array given the position of it. Function prototype: void insert (int item, int k, int a[], int *n); 2. A function to traverse an array to print its elements. Function prototype: void traverse (int a[], int n); 1 Inside the main function, Ask the user to specify the number of the array elements. Create a dynamic array of the specified size. Fill the array with any values. Call the insert function with different situations and call the traverse function after each insert to show the current state of the array. I You should also attach a screenshot of the program output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
