Question: Given the following program: = = = = BEGIN CODE = = = = int mul 1 ( int i ) { i = i

Given the following program:
==== BEGIN CODE ====
int mul1(int i){ i = i *2; return i; }
int mul2(int *a_pointer){
*a_pointer =(*a_pointer)*2;
return *a_pointer;
}
int main(int argc, char *argv[]){
int i =2;
int x = mul2(&i);
int y = mul1(i);
int z = mul2(&i);
printf("%d
", i);
return 0;
}
==== END CODE ====
What is the output printed out to the terminal?
Question 11 options:
16
4
2
8

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!