Answer:
Correct answer is D
Step-by-step explanation:
open is a function in c++ programming language used to interact with files.The function takes two parameters as input
- File name
- mode
File Name
File name is a string name of file to be opened.This is a compulsory parameter for open method.
Mode
Mode is an optional parameter in open function.Following are the accepted values of mode parameter
Prefix ios:: is added to start of each
- in (Open file in input mode for writing data to file)
- out (Open file in output / read-only mode to read data from file)
- binary (Open file in binary format)
- ate (Set the starting point of file to the end of file. Default starting point of file is start of file)
- "trunc" (If file is opened multiple times all previous data is replaced with new data)
- app (All operations of output are performed the end of file)
Use | operator to use multiple modes at a time.