Hi, I have a file. I need to copy its contents in reverse order of lines. I mean, the first line of the source file should be the last in the desination file, the second one should be the last but one and so on.
Thanks,
Sashi
Keeping line contents in the memory may be complicated, if the file is big enough. Try to stack only line start offsets, then extract them using fseek().
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.