A. Which statement is used to move the pointer in a fi le to the beginning of the first character?..
A. Which statement is used to move the pointer in a fi le to the beginning of the first character?
a. .seek(-1) b. .seek(1)
c. .seek(0) d. .seek(2)
B. Which statement is used to move the pointer in a fi le to the end of the file?
a. .seek(-1) b. .seek(1)
c. .seek(0) d. .seek(2)
C. True or False
1. ‘w+’ mode opens a file for write plus read.
2. The statement seek(5,1) is used to move the pointer 5 characters past the current position.
3. A file once opened in read mode cannot be used to write.
4. The .listread() statement is used to read each line of a file as an item in a list.
5. The readline() is used to read a line as string.
6. The readline() method can be used to read the content of each line in a binary file.
7. Binary files contain \n.
Leave a Reply