I have a small problem . I have a text file which i have to truncate after a conditionis met (after i reach a specific point). So i thought that instead of copying that file to another one .. what i would do is that i would add end of file character at the desired location. So i checked for the condition and when it was satisfied i put end of file (ascii 26) using fprinf(fp,"%c",26). But this trick is not working as instead of end of file a special symbol is being inserted instead.
So my problem is Can i insert end of file in middle of a text file and if yes then how??
Please help.