August
1997 QUESTION 3 Total Marks: 20 Marks |
Click here to access other
questions
Click to access |
3. | (a) Describe the relationship between a pointer and an array. | [3] |
(b) Describe the difference between call by reference and call by value parameter passing. | [2] | |
(c) Write a procedure called replace that takes two integer arguments, called sum and diff. It should change the values of these two variables so that the value of sum on exit is equal to the sum of the two values on entry, and the value of diff on exit is equal to the difference between the two values on entry. | [5] | |
(d) Trace the following code segment and produce the output: | [10] | |