Question: Ques) write code in c. which meets the following requirements. 3. Reverse Requirements . Create a new file called reverse.c, containing a single function that

Ques) write code in c. which meets the following requirements.

Ques) write code in c. which meets the following requirements. 3. Reverse

3. Reverse Requirements . Create a new file called reverse.c, containing a single function that matches this declaration void reverse( int arr[ ], unsigned int len ; .Array arr is of length len, and contains arbitrary integer values . The function should reverse the contents of the array in-place, so that on returning, the array contains the same values as before, but in the reverse order Guide Example of a program that uses your function I. #include 2 3. // declaration of function implemented in reverse.c 4. void reverse( int arr,unsigned int len 6. int main( void) 8. int a1, 12, 13; 9.unsigned int len-3; 10. 11.reverse( a, len 12. 13.unsigned int i-0 14.for( i-0; i 18. printf( " ")i 19 20.return 0 21. 1 printf ( "%d ", a[i] ); This code prints 13 12 11 Notice that the length of the array is not specified explictly: it is set to the length of the initialization list 111, 12, 13)

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!