Input / Output

Q1: A file written in text mode can be read back in binary mode.

A Yes

B No

ANS:B - No

The difference is that text files contain lines (or records) of text and each of these has an end-of-line marker automatically appended to the end of it whenever you indicate that you have reached the end of a line. Binary files are not broken up into separate lines or records so the end-of line marker is not written when writing to a binary file. So, we cannot read the correct the data in binary mode.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.