in C++Deleting Elements in a List at an Index Instructions Write a function, removeAt , that takes three parameters: an array of integers, the number of elements in the array, and an integer (say, index ). The function should delete the array element indicated by index. If index is out of range or the array is empty output the following message: Position of the item to be deleted is out of range or if the index is negative: Position of the item to be deleted must be nonnega (Note that after deleting the element, the number of elements in the array is reduced by 1.) Assume that the array is unsorted. Also, write a program to test the function. Your program should prompt the user to enter 10 digits for the array. Display the starting list to the user and prompt them to select the index of the integer to be removed the updated list should be displayed to the user. Show transcribed image text Deleting Elements in a List at an Index Instructions Write a function, removeAt , that takes three parameters: an array of integers, the number of elements in the array, and an integer (say, index ). The function should delete the array element indicated by index. If index is out of range or the array is empty output the following message: Position of the item to be deleted is out of range or if the index is negative: Position of the item to be deleted must be nonnega (Note that after deleting the element, the number of elements in the array is reduced by 1.) Assume that the array is unsorted. Also, write a program to test the function. Your program should prompt the user to enter 10 digits for the array. Display the starting list to the user and prompt them to select the index of the integer to be removed the updated list should be displayed to the user.
Expert Answer
Answer to Deleting Elements in a List at an Index Instructions Write a function, removeAt , that takes three parameters: an array …