Class 12 : File Handling Set 2

6.
Which of the following mode will refer to a binary data?

a) r
b) w
c) +
d) b

 

7.
Which function is used to read all characters from a file?

a) read()
b) readchar()
c) readall()
d) readcharacters()

 

8.
Which function is used to write list of strings in a file?

a) wirteline()
b) writelines()
c) write()
d) writes()

 

9.
Which of the following is not a valid mode to open a file?

a) ab
b) rw
c) r+
d) w+

 

10.
Which of the following functions is used to write data in the binary mode?

a) write
b) pickle
c) output
d) dump