Podcast
Questions and Answers
What does ios::app signify when used as a parameter in file opening?
What does ios::app signify when used as a parameter in file opening?
- Open fails if the file already exists
- Append to end-of-file, data will be written at the end of the file (correct)
- Open file for reading only
- Open fails if the file does not exist
What is the purpose of ios::binary when used as a parameter in file opening?
What is the purpose of ios::binary when used as a parameter in file opening?
- Open fails if the file does not exist
- Open file for reading only
- Specify that the file is a binary file (correct)
- Append to end-of-file, data will be written at the end of the file
When should ios::trunc be used as a parameter in file opening?
When should ios::trunc be used as a parameter in file opening?
- Open file for writing only
- Delete the contents of the file if it exists (correct)
- Stay at the current position
- Go to start of file
What is the significance of fin.seekg(0,ios::beg) in file handling?
What is the significance of fin.seekg(0,ios::beg) in file handling?
What does ios::in signify when used as a parameter in file opening?
What does ios::in signify when used as a parameter in file opening?