
LANGUAGE: C++
CHALLENGE:
Given a file named execution.log write the necessary code to add the line “Program Execution Successful” to the end of the file.
SOLUTION:
ofstream e_Log; e_Log.open("execution.log", ios::app); e_Log << "Program Execution Successful"; e_Log.close()
will u provide me correct ans plzz..
ofstream e_Log;
e_Log.open(“execution.log”, ios::app);
e_Log << "Program Execution Successful";
e_Log.close();
ofstream exe(“execution.log”, ios::app);
exe << "Program Execution Successful";
ofstream file(“execution.log”, ios::app);
file << "Program Execution Successful";
file.close();