Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer
Q. What is the pickling?
a. it is used for object serialization
b. it is used for object deserialization
c. none of the mentioned
d. all of the mentioned
Q. What is unpickling?
a. it is used for object serialization
b. it is used for object deserialization
c. none of the mentioned
d. all of the mentioned
Q. What is the correct syntax of open() function?
a. file = open(file_name [, access_mode][, buffering])
b. file object = open(file_name [, access_mode][, buffering])
c. file object = open(file_name)
d. none of the mentioned
Q. fo.close()
a. compilation error
b. runtime error
c. no output
d. flushes the file when closing them
Q. Correct syntax of file.writelines() is?
a. file.writelines(sequence)
b. fileobject.writelines()
c. fileobject.writelines(sequence)
d. none of the mentioned
Q. Correct syntax of file.readlines() is?
a. fileobject.readlines( sizehint );
b. fileobject.readlines();
c. fileobject.readlines(sequence)
d. none of the mentioned
Q. In file handling, what does this terms means “r, a”?
a. read, append
b. append, read
c. write, append
d. none of the mentioned
Q. Which function is used to read all the characters?
a. read()
b. readcharacters()
c. readall()
d. readchar()
Q. Which function is used to read single line from file?
a. readline()
b. readlines()
c. readstatement()
d. readfullline()
Q. Which function is used to write all the characters?
a. write()
b. writecharacters()
c. writeall()
d. writechar()
Q. Which function is used to write a list of string in a file?
a. writeline()
b. writelines()
c. writestatement()
d. writefullline()