Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following code. program MAN; var i : integer; var a : array [ 1 . . 5 ] of integer; procedure SUB (
Consider the following code.
program MAN;
var i : integer;
var a : array of integer;
procedure SUB : integer;
;:;:;;:;; endSUBPROG
:;:;:;:;:;:;
call SUB;
print;
NOTE: Assume that all uninitialized variables have the value zero.
a What is the program output assuming that the parameter is passed by value?
b What is the program output assuming that the parameter is passed by result?
Assume that the address of the pass by result parameter is bound at the time of call.
c What is the program output assuming that the parameter is passed by result?
Assume that the address of the pass by result parameter is bound at the time of return.
d What is the program output assuming that the parameter is passed by valueresult?
Assume that the address of the pass by result parameter is bound at the time of call.
e What is the program output assuming that the parameter is passed by reference?
f What is the program output assuming that the parameter is passed by name?
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