Question: In this exercise, you will code the following C program in MIPS [ use argument registers ( a ) , return registers ( v )

In this exercise, you will code the following C program in MIPS [use argument registers (a), return registers (v), jal, and jr appropriately, following the guidelines provided in the class]:
#include
int add(int a, int b){
return a + b;
}
int main(){
int a, b, c;
printf("Enter Two Numbers: ");
scanf("%d", &a);
scanf("%d", &b);
c = add(a,b);
printf("%d
", c);
return 0;
}

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!