title: Modes of C++ file handling
body: <p><a href="https://i.stack.imgur.com/OAnEX.png" rel="nofollow noreferrer">Look this example 2 comment</a><br><em><strong>Difference between trunc and out mode in C++?</strong></em><br>
  trunc and out are the two modes for ofstream. We know that truct deletes the data before the data before writing new data into the file whereas out mode just overwrites it.<br> I cannot find difference in the working of both the modes? Please explain the difference in detail with example? Please consider the fact that I have just started with programming and don't have much experience.</p>