Cambridge IGCSE · Computer Science (0478)

File handling:練習題

5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「File handling」。

10 條題目22 免費,無需登記
第 1 題
1

In pseudocode, which command is used to record a data item into an external file that has already been opened?

第 2 題
1

A programmer needs to store a list of 1000 product IDs. Which statement best explains why they should use a file instead of only using a 1D array in the program?

第 3 題
1

Which statement is true regarding file handling as defined in the Cambridge IGCSE syllabus?

第 4 題
1

In the pseudocode command READFILE "Results.txt", StudentScore, what is the specific role of StudentScore?

第 5 題
1

Which of the following describes the correct function of the READFILE command in pseudocode?

第 6 題
2

State the pseudocode command used to read a data item from an external file and explain the role of the variable that must be provided with this command.

先自己寫一次答案,再對照解題步驟。

第 7 題
3

A programmer needs to update a configuration file. Explain why opening a file in WRITE mode could be problematic if the file already contains important existing data.

先自己寫一次答案,再對照解題步驟。

第 8 題
5

Explain two technical reasons why a programmer must include the CLOSEFILE command after a program has finished processing data in a file.

先自己寫一次答案,再對照解題步驟。

第 9 題
3

A data logger records temperature values and stores them in a text file named "LogData.txt".

(a) State the pseudocode command and the specific mode used to open this file if the programmer wants to retrieve existing data from it.
(b) Name the specific pseudocode command used to read a single data item from this file into a variable.
(c) State the command used to finalize the process and release the file back to the system.

先自己寫一次答案,再對照解題步驟。

第 10 題
4

A school uses a text file named "StudentData.txt" to store the names of students in a class. There are exactly \(30\) students. A program is required to read these names and transfer them into a 1D array for easier access during the school day.

Write a pseudocode algorithm that:
- Declares a 1D array named StudentNames with \(30\) elements.
- Opens the file "StudentData.txt" in the appropriate mode.
- Uses a count-controlled loop to read all names from the file and store each name into the array.
- Closes the file after the operation is complete.

先自己寫一次答案,再對照解題步驟。

* thinka提供的內容由AI生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。

你已看過標準答案,接下來輪到批改你的答案。

這一頁可以告訴你好答案的樣子,卻無法指出你的答案欠缺什麼。thinka 按真實評分準則批改你的文字答案,約 15 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習