Question: c programming - Exercise 3 - Array operations using pointers (5 marks) Exercise Objectives A: Write a function with the following header int reverse (int

c programming
c programming - Exercise 3 - Array operations using pointers (5 marks)

- Exercise 3 - Array operations using pointers (5 marks) Exercise Objectives A: Write a function with the following header int reverse (int * start, int *end); The first parameter is a pointer to the first element of the array, the second parameter is a pointer to the last element of the array. The function is supposed to reverse the element in the array Example: If before calling the function, the array contains 4 9 3 6 Then after calling the function, the array should contain 6394 B: Write and run a C program that performs the following: Prompts the user to enter an integer N. Creates an array of integers of size N. o Fill the array with random integers in the range 5 to 111 inclusive. o Prints the array o Calls the reverse function to reverse the contents of the array Prints the array after calling the function. NOTE: Do the swap in the reverse function

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!