Question: Instructions Write a function, remove, that takes three parameters: an array of integers, the number of elements in the array, and an integer ( say

Instructions
Write a function, remove, that takes three parameters: an array of integers, the number of elements in the array, and an integer (say, removeItem). The function should find and delete the first occurrence of removeItem in the array.
(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 array to the user and prompt them to select an integer to remove.
After the selected integer has been removed, the updated list should be displayed to the user.
If the value does not exist or the array is empty, output the following message: '''' x is not in the list ''''

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 Programming Questions!