quiz3_sol - CDA3101 Quiz 3 Solution Fall 2009 Time: 15...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CDA3101 Quiz 3 Solution Last Name ________________________ Fall 2009 First Name ________________________ Time: 15 minutes 1. In a CDA3101 assignment, students were asked to translate the recursive C  function foo() shown below into MIPS assembly code. The MIPS code shown  below is a solution provided by a student. You have to play the role of the  TA and find and correct all errors (logical or otherwise) as well as  int foo (int x) {       if ( x <=0 ) return 1;       else return (x * foo (x-2)); } Strike each instruction you think is wrong and write the correct  instruction next to it If you need to add an instruction, write that instruction and draw an  arrow to show where that instruction will go
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/29/2010 for the course CDA 3101 taught by Professor Small during the Spring '08 term at University of Florida.

Page1 / 2

quiz3_sol - CDA3101 Quiz 3 Solution Fall 2009 Time: 15...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online