1 Consider the implementation of a procedure P with a formal parameter FP of type T . (a) Assume that the copy-in-copy-out parameter mechanism is used. What exactly is passed to P , a value or an...


1 Consider the implementation of a procedure
P
with a formal parameter
FP
of type
T.


(a) Assume that the copy-in-copy-out parameter mechanism is used. What exactly is passed to
P, a value or an address? What happens when
P
is called? What happens inside
P
when it inspects
FP?What happens inside
P
when it updates
FP?What if anything happens when
P
returns?


(b) Repeat, this time assuming that the variable parameter mechanism is used instead.


2 Choose a programming language (such as C or PASCAL) that does not support packages, abstract types, or classes. (a) How would the trigonometric package of Example 6.2 be programmed in your language? (b) What are the disadvantages of programming in this way?



Nov 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here