Computer Science
Assertion (A): The binary files are an advanced version of text files and work similar to text files.
Reasoning (R): The data in binary files are stored in the form of binary digits, 0 and 1; and is directly understood by the computer.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
A is false but R is true.
Explanation
Binary files are not an advanced version of text files but rather a different type of file. They serve different purposes and handle data differently. Text files store data as human-readable text using characters, while binary files store data using binary digits (0s and 1s), which are directly understood by computers.
Related Questions
Assertion (A): The file in Python is used to store information on a named location in the secondary storage device.
Reasoning (R): In Python, files are classified as program files and data files and as per the file type store the data specific to its use and purpose.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): The file access mode used to add or append the data in the file is 'a'.
Reasoning (R): In the access mode, 'a', the text will be appended at the end of the existing file. If the file does not exist, Python will create a new file and write data to it.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): To work with binary files, we need to import pickle module.
Reasoning (R): Pickle module contains two important methods for reading and writing data to binary files, i.e., load() and dump() respectively.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): The close() method is used to close the file.
Reasoning (R): While closing a file, the system frees up all the resources like CPU processor time and memory allocated to it.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.