Past-paper question · 2017 May-June · Paper 22 · Q4(b)

Question 4(b) 2017 · May-June · Paper 22 · 20 marks

Original past-paper question for 4(B)
Original past-paper question for 4(B)
Original past-paper question for 4(B)
Original past-paper question for 4(B)
Reveal official mark-scheme answer Official mark-scheme answer for 4(B)

Official answer for Question 4

Part (b)

Question 6

✓
Name of parameter
✓
Value
✓
Explanation
✓
passing method
✓
output
✓
•
✓
The address of the variable is passed.
✓
(Call) by reference

Question 5

✓
•
✓
Original value is changed when parameter
✓
changed in called module.
✓
•
✓
A copy of the variable itself is passed.
✓
(Call) by value

Question 4

✓
•
✓
Original value not changed when
✓
parameter changed in called module.
✓
Mark as follows:
  • 1 mark for each name and value
  • 1 mark per bullet in explanation
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s17_ms_22.pdf →

Show text version of question

Question 4

Part (b)

Question 4

WRITEFILE (MyFile, "Data is " & String2)

[6]

Part (b)

(i)

Complete the following two sentences.

A
suitable operand type for an arithmetic operator is ........................................................
A
suitable operand type for a logical operator is ...............................................................
[2]

(ii)

The following table shows the values of three variables.

Variable Value FlagA TRUE FlagB FALSE FlagC TRUE

Evaluate these expressions.

Expression Evaluates to

(FlagA AND FlagB) OR FlagC

FlagA AND (FlagB OR FlagC)

(NOT FlagA) OR (NOT FlagC)

[3]

Question 3

Part (c)

The loop construct (also known as repetition or iteration) appears in many algorithms.

Use pseudocode to write a post-condition loop to output all the odd numbers between 100 and 200.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

..............................................................................................................................................

[4]

Question 4

2 A multi-user computer system maintains a text file containing the ID and preferred name for each user. User IDs are unique. Preferred names may be repeated.

Part (b)

An initial identifier table is created as part of the stepwise refinement. A section of the table is

shown. Complete this table.

Identifier Data type Description

SearchUserID Stores the user ID entered

........................................................................... FileUserID ...........................................................................

........................................................................... FilePreferredName ...........................................................................

........................................................................... IDFoundFlag ...........................................................................

[5]

Question 5

Topic relevance

Why this question appears here

75% assigned-topic match · Hardware › Logic gates and logic circuits

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_22.pdf

Keep practising this topic