I
Ivy_Venkat
@Ivy_Venkat
Posts
-
How to intercept screen arbitrarily? -
How to Replace a line in a .TXT fileUser fscanf/fread to scan through the file and go to the required line Once the required line is found, use fseek to go back to the start of the line Do a fprintf/fwrite again. Keep in mind that if the new line is longer that the line in the file, it will overwrite entries in the next line. You will have to devise a appropriate insertion/modify strategy if the line lengths can be different.