Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started