Computer Science For First Examination In 2021 9618 · 20

20.2 File processing and exception handling

7 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2025 October-November · Paper 32 · Q10(a)

File processing and exception handling · 2 marks · official answer ready

(a) Describe how program termination due to an exception can be avoided. ..........................................................................................................…

2025 October-November · Paper 42 · Q3(c)

File processing and exception handling · 4 marks · official answer ready

(c) The text file TreeData.txt stores 50 integers. Each integer is on a new line in the file. The main program reads each integer from the file and stores each integer in the bina…

2024 October-November · Paper 41 · Q1(a)

File processing and exception handling · 6 marks · official answer ready

(a) The text file Data.txt stores string data items. Each data item is on a new line in the text file. The function ReadData(): • has a local array of strings that can store 45 it…

2024 October-November · Paper 42 · Q3(b)

File processing and exception handling · 5 marks · official answer ready

(b) The function ReadData() reads the data from HighScoreTable.txt and stores the data in a 2D array. The function returns the 2D array. The function uses exception handling when …

2024 October-November · Paper 43 · Q1(a)

File processing and exception handling · 6 marks · official answer ready

(a) The text file Data.txt stores string data items. Each data item is on a new line in the text file. The function ReadData(): • has a local array of strings that can store 45 it…

2023 May-June · Paper 41 · Q1(a)(ii)

File processing and exception handling · 4 marks · official answer ready

(ii) Amend the main program to read the contents of Data.txt into DataArray Save your program. Copy and paste the program code into part 1(a)(ii) in the evidence document. [4]

2023 May-June · Paper 43 · Q1(a)(ii)

File processing and exception handling · 4 marks · official answer ready

(ii) Amend the main program to read the contents of Data.txt into DataArray Save your program. Copy and paste the program code into part 1(a)(ii) in the evidence document. [4]