MCQ
Which of the following command is used to open a file "d:temp.txt" for writing in binary format only?
  • A
    fout = open("d:story.txt", "wb")
  • fout = open("d:temp.txt", "wb")
  • C
    fout = open(file = "d:temp.txt", "wb+")
  • D
     fout = open(file = "d:temp.txt", "wb+")

Answer

Correct option: B.
fout = open("d:temp.txt", "wb")
fout = open("d:temp.txt", "wb")

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free