Question 1(c)(iii) 2017 · May-June · Paper 32 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 1
Part (c)
(iii)
Question 1
Show text version of question
Question 1
Part (c)
(iii)
Consider the pseudocode on page 3, which uses the following identifiers:
Identifier Data type Description IPointer ^INTEGER pointer to an integer Sum INTEGER an integer variable MyInt1 INTEGER an integer variable MyInt2 INTEGER an integer variable
Question 3
Sum 91 // assigns the value 91 to the integer variable Sum IPointer @Sum // assigns to IPointer the address of the // integer variable Sum MyInt1 IPointer^ // assigns to variable MyInt1 the value at an // address pointed at by IPointer IPointer^ MyInt2 // assigns the value in the variable MyInt2 to // the memory location pointed at by IPointer
The four assignment statements are executed. The diagram shows the memory contents after execution.
Memory Variable Contents Address
...
5848 5847 IPointer 5846 4402 5845
...
4403 Sum 4402 33 4401
...
3428 MyInt1 3427 91 MyInt2 3426 33 3425
...
Use the diagram to state the current values of the following expressions:
(iii)
@MyInt1 ......................................................................................................................[1]
Why this question appears here
71% assigned-topic match · Programming › Programming basics
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s17_qp_32.pdf
