Quelpr
1 markPaper 1 · Multiple choiceTesting Algorithms

CSEC Information Technology · May/June 2018 · Paper 1 · Question Q47

Item 47 refers to the following pseudocode and trace table. a \leftarrow 7 b \leftarrow 1 For n \leftarrow 1 to 3 do a \leftarrow b + 1 b \leftarrow a + b \begin{tabular}{|c|c|c|} \hline \textbf{n} & \textbf{a} & \textbf{b} \\ \hline & 7 & 1 \\ 1 & 2 & X \\ 2 & 4 & 7 \\ 3 & 8 & 15 \\ \hline \end{tabular} What is the value of X?

  1. (A)3
  2. (B)8
  3. (C)9
  4. (D)14

This question uses a figure or table from the paper — you'll see it when you practise.

The answer is shown once you've answered.

Practise this question

More practice: the rest of this paper · more Testing Algorithms questions · all CSEC Information Technology past papers