What does the following code do?
ofstream file("data.txt", ios::app);
file << "Hello World\n";
file.close();
Creates a new file and writes data.
Overwrites the file contents.
Appends data to the file without deleting existing content.
Reads data from the file.
This question is part of this quiz :
File Handling