Past-paper question · 2019 May-June · Paper 21 · Q4(c)

Question 4(c) 2019 · May-June · Paper 21 · 1 mark

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

Official answer for Question 4

Part (c)

✓
Adaptive Maintenance

Question 1

✓
9608/21
✓
Cambridge International AS/A Level – Mark Scheme
✓
May/June 2019
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s19_ms_21.pdf →

Show text version of question

Question 4

Part (c)

Question 4

The following pseudocode is a string handling function.

For the built-in functions list, refer to the Appendix on page 16.

FUNCTION Clean(InString : STRING) RETURNS STRING

DECLARE NewString : STRING DECLARE Index : INTEGER DECLARE AfterSpace : BOOLEAN DECLARE NextChar : CHAR CONSTANT Space = ' '

AfterSpace FALSE NewString ""

FOR Index 1 TO LENGTH(InString) NextChar MID(InString, Index, 1) IF AfterSpace = TRUE THEN IF NextChar <> Space THEN NewString NewString & NextChar AfterSpace FALSE ENDIF ELSE NewString NewString & NextChar IF NextChar = Space THEN AfterSpace TRUE ENDIF ENDIF ENDFOR

RETURN NewString

ENDFUNCTION

Question 9

Part (c)

State the term used for changes that are made to a program in response to a specification

change.

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

[1]

Question 11

Question 5 begins on the next page.

Question 12

Topic relevance

Why this question appears here

99% assigned-topic match · Data types and structures › Data types and records

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

Keep practising this topic