12th Class Computers Science Sample Paper File Handling - Sample Paper-2

  • question_answer
    To read the complete content of a file as a string from a file object f, which statement you should use:

    A) f.read(5)           

    B) f.read()

    C) f.readline()       

    D) f.readlines()

    Correct Answer: B

    Solution :

    [b] f.read() function should be used to read the complete content of a file as a string.


You need to login to perform this action.
You will be redirected in 3 sec spinner