



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The questions are the type you should expect. The best way to use this practice is to take it like you are taking a real exam. One caveat is that the ...
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Since there are no past midterms to look at, this document provides some practice questions. The questions are the type you should expect. The best way to use this practice is to take it like you are taking a real exam. One caveat is that the length of the practice exam is not representative of the length of the midterm, so you will probably take more than 75 minutes on the practice. Grade yourself with the solutions after you’ve taken this practice. The exam will be open book/open note. No electronics. Show your work when appropriate.
loop: lw $t2,0($t0) # t2 gets 1st element of array A lw $t3,0($t1) # t3 gets last element of array A sw $t2, 0($t1) (^) # store ___ into end of A sw $t3, 0($t0) (^) # store ___ into start of A addi $t1, $t1, _- 4 __ (^) # Update $t addi $t0, $t0, _ 4 __ (^) # Update $t bgt $t1, $t0, loop (^) # Continue until $t0>=$t