Past-paper question · 2017 May-June · Paper 32 · Q1(c)(iii)

Question 1(c)(iii) 2017 · May-June · Paper 32 · 1 mark

Original past-paper question for 1(C)(III)
Original past-paper question for 1(C)(III)
Original past-paper question for 1(C)(III)
Reveal official mark-scheme answer Official mark-scheme answer for 1(C)(III)

Official answer for Question 1

Part (c)

(iii)

✓
3427

Question 1

Mark scheme 9608_s17_ms_32.pdf →

Show text version of question

Question 1

Part (c)

(iii)

A
pointer is a variable that stores the address of a variable of a particular type.

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]

Topic relevance

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

Keep practising this topic