Question: Write a function called insertIntoSortedArray. It should take three arguments - a sorted array of numbers at least 100 long, the actual number of filled
Write a function called insertIntoSortedArray. It should take three arguments - a sorted array of numbers at least 100 long, the actual number of filled entries in that array, and a new value to be added to that array. It should then insert the new value into the correct spot so that the array remains sorted. It should return the new size of the array. This function can be declared the following way: int insertIntoSortedArray(int myArray[], int numEntries, int newValue);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
