I have a text file with the following lines written on it:
In C++, if I open a file just for writing, whatever was on it is lost and the file is updated with the new content. I'm trying to do the same thing in C with fopen("file'txt", "w") but the file is not being updated. Should I use something else in the place of w? Thanks.