Question: Translate the following C code: #include int myAge; void putNext ( int age ) { int nextYr; nextYr = age + 1 ; printf (

Translate the following C code:
#include
int myAge;
void putNext(int age){
int nextYr;
nextYr = age +1;
printf("Age: %d
", age);
printf("Age next year: %d
", nextYr);
}
int main (){
scanf("%d", &myAge);
putNext(myAge);
putNext(64);
return 0;
}
into something that looks like this:
BR main
num: .BLOCK 2
sum: .BLOCK 2
amount: .BLOCK 2
main: DECI num,d
LDWA 20000,i
STWA amount,d
LDWA num,d
ADDA amount,d
STWA sum,d
STRO s,d
DECO sum,d
STOP
s: .ASCII "
sum =\x00"
.END
This code takes an input, adds it to 20000 then prints the sum.

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!