CO code below. function phil (int a, int b, int c) begin end b := b + 5; b = a + c + 4; print a, b, c; function main begin int j := 10; ink k := 15; phil(j, j, j + k); print j, k; end shalic ava A x is passed by value ref. wis pased toy ref. y B Stahs scoping. Brow Yad 56 und 10 Under 3 • Unde 2 undef Undf Links (static/d parameters local vaiably local runtine Stack. A 3 @b " int i = 0; ས༽བ i=0 Variable/identifier name int 5. Cheap Bw 3.99 @h mdf under

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question

I need to draw the state of the memory using the specifications below and provide answers to the question. I have to do it similar to the one shown on the board if that makes any sense. 

All parameters are passed by reference.

The language uses static scoping.

What are the values of j and k after the execution of the program?

CO code below.
function phil (int a, int b, int c)
begin
end
b := b + 5;
b = a + c + 4;
print a, b, c;
function main begin
int j := 10;
ink k := 15;
phil(j, j, j + k);
print j, k;
end
Transcribed Image Text:CO code below. function phil (int a, int b, int c) begin end b := b + 5; b = a + c + 4; print a, b, c; function main begin int j := 10; ink k := 15; phil(j, j, j + k); print j, k; end
shalic
ava
A x is passed by value
ref.
wis pased toy ref.
y
B
Stahs scoping.
Brow
Yad 56
und 10
Under 3
•
Unde 2
undef
Undf
Links (static/d
parameters
local vaiably
local
runtine
Stack. A
3
@b
" int i = 0;
ས༽བ
i=0
Variable/identifier
name
int
5.
Cheap
Bw
3.99
@h
mdf
under
Transcribed Image Text:shalic ava A x is passed by value ref. wis pased toy ref. y B Stahs scoping. Brow Yad 56 und 10 Under 3 • Unde 2 undef Undf Links (static/d parameters local vaiably local runtine Stack. A 3 @b " int i = 0; ས༽བ i=0 Variable/identifier name int 5. Cheap Bw 3.99 @h mdf under
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr