Question: Create a program that creates an array of size n, where n is a const int (I will modify your code by changing the value

Create a program that creates an array of size n, where n is a const int (I will modify your code by changing the value of n, and your code should still behave properly). The code shall then initialize the array with a random value for each element, drawn using the c standard library function rand (), and hence the function rand () shall be called n times. Your code shall then ask the user to choose either to reverse the array, re-initialize the array, or exit one in lab 2. If the user enters 'i or T', your If the user enters '' or 'R', your program shall swap array values as d code shall initialize the array code shall exit. with another set of random values. If the user enters any other character, then your Hints: To generate a random number you shall include the header file stdlib.h (#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
