c - how to set file pointer with fseek -


I know that after printing this string, my file is at the end of the indicative line: "xyz".

How do I get it at the beginning of the line? (Pointing to X)

  offset = ftell (fp); Fseek (FP, offset - size ("xyz"), SEEK_SET);   

Do not seem to work up.

How can I get it?

I have an offset beginning = ftell (fp) before reading / writing "Xyz" then fseek (fp, beginning, SEEK_SET);

Is this possible?

Comments