first of all I didn't write this thread till I tried million times with this piece of code but still I'm not getting the desired results.
I have a textfile and i want to exchange the lines,
I'm not trying to edit the same file, I'm trying just to print the wanted result to the screen
here is my code and tell me what's wrong (no compiling error or warnings)
it just prints the last line at first(which is good) then stops working, even if there's more than 2 lines in the file.
void revlines(int my_fd)
int r=0; // to be the index of the end of a new line
int l=0; // to be the index of the beginning of the line
this may be an easy problem for you guys but this is just my second program in c and this is just a tiny bit of it.
Thanks in advance