1(a)3 marks
Explain what abstraction is and how it is used in a map of a train network.
procedure change(byVal a, byRef b) a = a * 2 b = b + aendprocedure x = 3y = 4change(x, y)print(x)print(y)State the outputs and explain the difference between passing by value and by reference.function power(base, exp) if exp == 0 then return 1 else return base * power(base, exp - 1) endifendfunctionRewrite power as an iterative function and compare the two versions.Answer every question to finish (26 left), or finish when the time’s up.
This paper is written by Plasmo in the style of the OCR A-Level Computer Science exam. It is not a past paper and is not produced or endorsed by the exam board.