Search Header Logo

File Handling MCQs

Authored by Anuja Jambhale

Computers

11th - 12th Grade

Used 1+ times

File Handling MCQs
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `WRITE` mode do when a file is opened in this mode?

Reads data from the file

Writes data to the file, overwriting any existing content

Adds data to the end of the file

Reads and writes data to the file

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `APPEND` mode do when a file is opened in this mode?

Reads data from the file

Writes data to the file, overwriting any existing content

Adds data to the end of the file

Deletes the content of the file

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to check if the end of a file has been reached?

EOF()

endOfFile()

end()

isEOF()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `READ` mode do when a file is opened in this mode?

Adds data to the file

Reads data from the file

Overwrites data in the file

Deletes the file

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type must be used when reading or writing lines in a text file?

INTEGER

FLOAT

STRING

BOOLEAN

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of closing a file after it is no longer being used?

To prevent data corruption

To write data automatically

To delete the file

To change file permissions

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is TRUE about the `EOF` function?

It writes data to the file

It returns TRUE if the end of the file is reached

It returns FALSE when the file is first opened

It reads the last line of the file

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?