Question: CAN YOU PLEASE HELP ME THIS PROBLEM IN C++. THANK YOU SO MUCH. Lab 1: Array Insertion Work on this exercise on your own. This

CAN YOU PLEASE HELP ME THIS PROBLEM IN C++. THANK YOU SO MUCH.

CAN YOU PLEASE HELP ME THIS PROBLEM IN C++. THANK YOU SO

Lab 1: Array Insertion Work on this exercise on your own. This will be a good practice to help you review the topic. Using the project lab_01_array_insertion, implement the declaration and definition of the following function where indicated: . insertAtindex Parameters: the array, the number of elements in the array, the element to insert, and the index where the element needs to be inserted. o o Example Array is: [10, 54, 81, 45, 95, 25, 12, 67] Element to insert: 79 ndex: 4 After inserting element [10, 54, 81, 45, 79, 95, 25, 12, 67] To insert an element, you need to shift all the elements. Consider the following cases: o If the array is full, output the following error message "Array is full. Cannot insert another element." (Use cerr instead of cout.) If the index is larger than the number of elements in the array (for example, the array contains 10 elements and the index is 11 or larger), output the error message "You can only insert contiguous elements in the array." (Use cerr instead of cout.) If the index exceeds the capacity, output the error message "The array cannot have more than ### elements." where ### is the capacity of the array. (Use cerr instead of cout.) Can use either FOR or WHILE loop. o Testing cases are already provided for you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!