Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pass by value: When called - the value of the argument is copied into the corresponding parameter. Pass by reference: When called- the address of

image text in transcribed

Pass by value: When called - the value of the argument is copied into the corresponding parameter. Pass by reference: When called- the address of the argument is used as the address of the corresponding parameter, during the execution of the procedure. Pass by Name: The address and values of the corresponding arguments are used to resolve the address at runtime. Main Program: A: Integer; Data : Array (1..10] of Integer; Procedure1 (X: Integer, D2: Array[1..10] of Integer); Begin Data[X] := 99; X := 5; D2[AL:=55; End; Begin A : = 10; B := 10; Data[1..10] all set to 0; // initializations Output the values of A, B, Data (1..10] // output Procedure1 (A, Data); // call procedure Output the values of A, B, Data (1..10] // output End. Trace the execution of the program above and show the output under each of the following conditions: 1: All parameters are passed by value 2: All parameters are passed by reference 3: All parameters are passed by Name

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 Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

5. Why is the job done?

Answered: 1 week ago

Question

Define span of management or define span of control ?

Answered: 1 week ago

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago