Question: Hello i have a c programming homework could you help me? Part 3. Write a method void remove(int *a, int index) that will remove the
Part 3. Write a method void remove(int *a, int index) that will remove the number at the given index and shift all remaining numbers one position to the left in the array a. Assume that the last element of the array is-1. Now, write a main function that will define an array int A[40]=[3, 5, 9, 17, 24,-1): read from user input an index; and call the method remove passing array A and the index given by the user. For example if user enters 2, then number 9 at index 2 will be removed and the array will now contain [3, 5, 17, 24, -1) Print the array after te emovl. You MUST write the remove method using ONLY pointers and pointer arithmetic (no array notation |) allowed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
