In pseudocode, which command is used to record a data item into an external file that has already been opened?
Cambridge IGCSE · Computer Science (0478)
File handling: แบบฝึกหัด
ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 5 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง File handling
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?
Which statement is true regarding file handling as defined in the Cambridge IGCSE syllabus?
In the pseudocode command READFILE "Results.txt", StudentScore, what is the specific role of StudentScore?
Which of the following describes the correct function of the READFILE command in pseudocode?
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.
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
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.
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
Explain two technical reasons why a programmer must include the CLOSEFILE command after a program has finished processing data in a file.
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
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.
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
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 วินาที
อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ
เริ่มฝึกเลย