[prev] 34 [next]

Exercise 5: Debugging

Debug a buggy SPIM version of the following C program

#include <stdio.h>
int x = 9;
int y = 4;
int main(void){
     int z = x * (2 + y)/2;
     printf("%d\n",z);
     return 0;
}