Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago