Question: function guess(int a, int b, int c) begin b := b + 5; b := a + c + 4; print a, b, c; end

function guess(int a, int b, int c)

begin

b := b + 5;

b := a + c + 4;

print a, b, c;

end

function main

begin

int j := 10;

ink k := 15;

guess(j, j, j + k);

print j, k;

end

Need to find out what values are printed in guess and main if:

1. Pass by value

2. a and b are passed by reference, and c is passed by value

3. a and b are passed by balue-result, and c by value

4. Pass by name

Step by step and explanation would be appreicated.

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!