Question: covert the following c code into MIPS , dont use syscall rather jal C Code : int a , b , c , f; /

covert the following c code into MIPS , dont use syscall rather jal
C Code : int a, b, c, f;// Declare results counters
int i; // Declare loop counter
int y; // Declare total number of students
y =12; // Initialize y =12
a=0; b=0; c=0; f=0; // Initialize results counters
int coursework []; // Coursework is an array to store
// the coursework marks that goes
// from 0 to 50.
int exam [];// Exam is an array to store the exam
// marks that goes from 0 to 50.
int results [];// Results is an array to store the
// total marks = coursework + exam. // And the sorted total marks.
// It goes from 0 to 100.
for (i=0; i h){
d =??; // d =100 the highest
// mark in your results array
for (i=0; i=70,>=60,>=50 and <50
//----------------------------------------------------------
f =0;
for (i=0; i=70)
a = a +1;
else if(results[i]>=60)
b = b +1;
else if(results[i]>=50)
c = c +1;
else
f = f +1;
}
//----------------------------
// Main program code ends here
//----------------------------
//------------------
// CURVE function code
//------------------
void CURVE (int p[], int z, int k)
{
p[z]= p[z]+ k;
}

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 Databases Questions!