Try this exercise. Click the correct answer from the options.
In the given scenario, the application writes financial data into a text file, which is then read by analysts for data processing. In terms of file handling, what function is used to write data to a file in C++?
Click the option that best answers the question.
- printf()
- scanf()
- cin
- ofstream