What does ios :: app do in c++?



What does ios :: app do in c++?..

Answer / Gaurav Singh Rathour

ios::app is a manipulator used with std::cout to append data to the end of an existing file instead of overwriting it. Here's an example:nn```cppn#include <iostream>n#include <fstream>nnstd::ofstream file("example.txt", ios::app);nfile << "Appending to the file...";n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is c++ a low level language?

1 Answers  


Write about the members that a derived class can add?

1 Answers  


Which of the following operator cannot be overloaded?

2 Answers   TCL,


What is object in c++ wikipedia?

1 Answers  


why is iostream::eof inside a loop condition considered wrong?

1 Answers  


What are Virtual Functions? How to implement virtual functions in "C" ?

3 Answers  


Define inline function

1 Answers  


What is the difference between the functions rand(), random(), srand() and randomize()?

1 Answers  


What are maps in c++?

1 Answers  


What is the v-ptr?

1 Answers  


Explain the isa and hasa class relationships. How would you implement each?

1 Answers  


What is while loops?

1 Answers  


Categories