Question: IN RISC - V Task 1 : Swap elements in an array ( 8 points ) Please declare an array A in your data segment

IN RISC-V
Task 1: Swap elements in an array (8 points)
Please declare an array A in your data segment with 10 random integers. Program to find the
maximum number of A and put it as the last element in the array while other elements relative
order does not change. Then print A[0] to A[9] on the screen.
For example:
Input: A=(2,-1,3,8,10,5,4,23,-20,6)
Output: A=(2,-1,3,8,10,5,4,-20,6,23)
Test your program by giving different values to A. Please save the screenshot of the two
following test cases:
A=(7,12,3,6,23,90,-2,-122,10,1)
A=(1205,5523,703,66,-324,0,-9,80,5048,990)
IN RISC - V Task 1 : Swap elements in an 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 Programming Questions!