File Handling (OCR GCSE Computer Science): Quizzes

📚Quizzes
File Handling
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

11 questions from this quiz

Show

What are the four key file operations in file handling?

Open, read, write, close

What must be done before reading from or writing to a file?

The file must be opened

Which mode adds data to an existing file?

Append mode

What does reading a file mean?

Extracting data from it

How are files typically read?

Line by line or in chunks

What happens to existing file contents when opened in write mode?

May be overwritten

Why must a file be closed after reading or writing?

To free up system resources

What does closing a file ensure?

All data is properly saved

In Python, what does open("file.txt", "r") do?

Opens a file for reading

In Python, what does open("file.txt", "w") do?

Opens a file for writing

What command closes a file in Python?

file.close()

Explore OCR GCSE Computer Science Revision Notes by Topics

Explore OCR GCSE Computer Science Model Answers by Topics

Explore OCR GCSE Computer Science Flashcards by Topics

Explore OCR GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.