May/June 2026 Paper 32

2026 · 11 questions · 26 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong26Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
10(a)Algorithm Efficiency Big OMedium3 marks
Two examples of searching algorithms are a linear search and a binary search.
Describe how increasing the number of data items in the file to be searched affects the time efficiency of these search algorithms. Refer to Big O notation in your answer.

Answer

0 words
10(b)File Handling ExceptionsHard6 marks
A temperature in degrees Celsius () is recorded every minute for one day in a random file, Temperatures.dat.
A function is required to find the temperature for a specific time in the day to check if it was freezing. The position of each temperature in the file corresponds to the number of minutes after midnight, for example, the temperature at 10:00 am would be stored at position 600 (10 60).
Write the pseudocode to complete the algorithm to check a temperature stored in Temperatures.dat, by passing its position in the file as a parameter and using file handling commands to find the relevant data item. Once the temperature is found, it is checked to see if it is above or below freezing, and an appropriate message is returned.
Some of the blank lines may not be used. Write the complete pseudocode for the function, including the lines already given below.
pseudocode
FUNCTION TempCheck( ... )    DECLARE Temperature : REAL    DECLARE Response : STRING    OPENFILE ...    ...ENDFUNCTION

Answer

0 words