Question: Answer Q4 3. [10 Pts] Consider a pseudocode for the BubbleSort algorithm as given below and write a C code for implementing the given BubbleSort
Answer Q4
3. [10 Pts] Consider a pseudocode for the BubbleSort algorithm as given below and write a C code for implementing the given BubbleSort procedure. As a test case, use it to sort the following array of integers in ascending order: 100,50,10,30,70,60 procedure bubblesort( A : list of sortable items ) n= length (A) repeat newn =0 for i=1 to n1 inclusive do if A[i1]>A[i] then swap (A[i1],A[i]) newn =i end if end for n= newn until n 4. [10 Pts] Translate your C code for Q.3 above to ARM7 Assembly Language with the use of conditional instructions to minimize the number of used assembly instructions. Simulate your program using VisUAL ARM emulator and include a snapshot (using "Tools > View memory contents") to show that your program produced the correct sorted array. (Copy your assembly code below along with screenshots)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
