Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
inserting text into a file
Is there a way to write to a file starting at some point inside and inserting the new text instead of overwriting? If there isn't a function that can do that directly, is it possible to read the part of the file from the point I want to insert at on, delete that, append the new text to the file, and then put back the part that I took out? How would I do that?