Class 12 : File Handling Set 2

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

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


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

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


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

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


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

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


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

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