Past-paper question · 2018 October-November · Paper 22 · Q4(c)(i)

Question 4(c)(i) 2018 · October-November · Paper 22 · 1 mark

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

Official answer for Question 4

Part (c)

(i)

✓
Through the use of: Subroutines / Functions / Procedures / Parameters /

Question 1

✓
Methods

Mark scheme 9608_w18_ms_22.pdf →

Show text version of question

Question 4

Part (c)

(i)

Question 4

Part of a program written in pseudocode is shown.

010 DECLARE NextArrayElement : INTEGER

…

100 FUNCTION ScanFile(SearchString: STRING) RETURNS INTEGER 101 102 DECLARE FileData : STRING 103 DECLARE FileLine : INTEGER 104 105 NextArrayElement 1 106 FileLine 1 107 FileData ReadFileLine("DataFile.txt", FileLine) 108 109 WHILE FileData <> "" 110 IF LEFT(FileData, 7) = SearchString 111 THEN 112 ResultArray[NextArrayElement] FileData 113 NextArrayElement NextArrayElement + 1 114 ENDIF 115 FileLine FileLine + 1 116 FileData ReadFileLine("DataFile.txt", FileLine) 117 ENDWHILE 118 119 CALL ScanCompleted() 120 RETURN FileLine 121 122 ENDFUNCTION

(i)

State how structured programming languages support the implementation of sub-tasks.

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

Topic relevance

Why this question appears here

75% assigned-topic match · Programming › Structured programming

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

Keep practising this topic