Class 12 : File Handling Set 2

1.
Information stored on a storage device with a specific name is called……..

a) array
b) dictionary
c) file
d) list

 

2.
Which of the following files can be created programmatically through Python to store some data

a) Data file
b) Text files
c) Binary files
d) Video files

 

3.
TO open a file c:\ss.txt for appending data, we use

a) file=open(“c:\\ss.txt”,”a”)
b) file=open(“c:\\ss.txt”,”rw”)
c) file=open(“c:\ss.txt”,”a”)
d) file=open(“c:\ss.txt”,”w+”)

4.
To read the next line of the file from a file object infi, we use

a) infi.read(all)
b) infi.readline()
c) infi.rea()
d) infi.readlines()

 

5.
The readlines() method returns

a) string
b) a list of lines
c) a list of characters
d) a list of integers

Number Of Visitors

0125580