Question 4(c)(i) 2018 · October-November · Paper 22 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 4
Part (c)
(i)
Question 1
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]
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
