Past-paper question · 2015 May-June · Paper 23 · Q4(b)(iii)

Question 4(b)(iii) 2015 · May-June · Paper 23 · 1 mark

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

Official answer for Question 4

Part (b)

(iii)

(iii)

data of the existing 15 dispensers will be lost/overwritten

[1]

Mark scheme 9608_s15_ms_23.pdf →

Show text version of question

Question 4

Part (b)

(iii)

Question 4

A programming language has the built-in function CONCAT defined as follows:

CONCAT(String1 : STRING, String2 : STRING [, String3 : STRING] ) RETURNS STRING For example: CONCAT("San", "Francisco") returns "SanFrancisco" CONCAT("New", "York", "City") returns "NewYorkCity"

The use of the square brackets indicates that the parameter is optional.

A
country has a number of banks. There are cash dispensers all over the country. Each bank

is responsible for a number of dispensers.

  • banks have a three digit code in the range 001 – 999
  • each dispenser has a five digit code in the range 00001 – 99999
A
text file, DISPENSERS, is to be created.

It has one line of text for each dispenser. For example: 00342▼007.

This line in the file is the data for dispenser 00342 which belongs to bank 007.

Incomplete pseudocode follows for the creation of the file DISPENSERS.

Question 9

For the creation of the file, data is entered by the user at the keyboard.

(iii)

The programmer coded this algorithm above and the user successfully entered 15

dispenser records into the text file.

There is data for another 546 dispensers which needs to be added.

State the error that will occur if the user runs the program a second time for further data entry.

.......................................................................................................................................[1]

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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

Keep practising this topic