When working with binary files in C, what is the significance of the 'b' character in the mode string?
- It denotes the file is binary, and data is stored as a series of 0s and 1s.
- It indicates the file is a backup copy.
- It represents the file is a text file.
- It specifies the file is in compressed format.
In C, the 'b' character in the mode string indicates that the file is opened in binary mode. In this mode, data is read or written in its raw binary form, without any character encoding or translation. This is essential when working with binary files like images or executable files.
Loading...
Related Quiz
- Command line arguments are accessed in a C program using the parameters ________ and ________ in the main function.
- In a graphics program, you need to define colors where each color can be represented as either a name or an RGB triplet. How would you efficiently represent this in C?
- In C, function pointers are useful when you want to choose at runtime which ________ to execute.
- You're tasked with optimizing a program that reads large text files. What strategies could you employ to improve the performance of the file reading operation?
- Which function in C is used to flush the output buffer of a stream?