Question: 2 . For each of the parameter passing methods what will be the output? a . Pass - by - value b . Pass -

2. For each of the parameter passing methods what will be the output?
a. Pass-by-value
b. Pass-by-reference
c. Pass-by-value-result
d. Pass-by-name
procedure main(){
i:integer;
a:array[1,2] of integer;
procedure f(x:integer){
a[2] :=6;
i :=1;
x := x +3;
}
a[1] :=5;
a[2] :=10;
i :=2;
f(a[i]);
print(a[i], a[2], i)
}

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!