Question 1(c)(iii) 2017 · May-June · Paper 31 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 1
Part (c)
(iii)
Question 88
Question 1
Show text version of question
Question 1
Part (c)
(iii)
Consider the code on page 3, which uses the following identifiers:
Identifier Data type Description IntPointer ^INTEGER pointer to an integer IntVar INTEGER an integer variable Temp1 INTEGER an integer variable Temp2 INTEGER an integer variable
Question 3
IntVar 57 // assigns the value 57 to the integer // variable IntVar IntPointer @IntVar // assigns to IntPointer the address of the // integer variable IntVar Temp2 IntPointer^ // assigns to variable Temp2 the value at an // address pointed at by IntPointer IntPointer^ Temp1 // assigns the value in the variable Temp1 to // the memory location pointed at by IntPointer
The four assignment statements are executed. The diagram shows the memory contents after execution.
Memory Variable Contents address
...
8217 IntVar 8216 88 8215 8214
...
7307 IntPointer 7306 8216 7305
...
6717 Temp1 6716 88 Temp2 6715 57 6714
...
Use the diagram to state the current values of the following expressions:
(iii)
IntPointer^ ...............................................................................................................[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_31.pdf
