Question: Write Programs for the following exercises: 1. Use my basic arrays starter program. This should already have an array called list with some numbers in

Write Programs for the following exercises: 1. Use my basic arrays starter program. This should already have an array called list with some numbers in it. The CAP or capacity of this is array is 10 elements. The int size variable keeps track of the number of elements in the array. 2. Delete an element from the array: Ask the user to enter an index and delete the value from that position. When this is done, you must decrement size by 1 and then print the array and make sure the element is deleted. Print only from 0 to size, so you should only see 9 elements after one has been deleted. 3. Insert an element into the array: Ask the user to enter the index where to insert an element. Then ask the user to enter the value for that index. Then insert the value into that index by shifting the other elements. After inserting the element, increment the size by 1. Print again from 0 to size, so you should see 10 elements again in the array.

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!