: : : : Hello,
: : : :
: : : : Can anyone help me out to code a c/c++ program to reverse content of
: : : : file without temp file
: : : : &
: : : : A code to swap higher bytes and lower bytes in integer variable
: : :
: : : Yes we can help you but will not write the code for you. That's
: : : your job, not ours.
: : :
: : : To reverse a file I would read the whole file into memory then write
: : : it back out in reverse order. Do you want to do it in C or C++
: : : (yes, there is a difference).
: : :
: : : To swap bytes: several ways to do it. (1) use shift operator, (2)
: : : use union, (3) copy the original int binary value to a char buffer
: : : then copy back again in reverse order.
: : : =============================================
: : : never lie -- the government doesn't like the competition. (Author
: : : unknown)
: :
: : you could also use fseek(file, SEEK_END) and read each line
: : backwards, then ouput.
: :
:
: that will not change the contents of the file only display it
: backwards. It will work if that is what OP wants to do.
:
: =============================================
: never lie -- the government doesn't like the competition. (Author
: unknown)
hi to you...
seems like you have a big problem, am i right?
and that is y ou don't persue yourself to study for it...
you have to focus on it so that you will get what you want to attain...
i can give you not the code,
but a prob that will force you to persue on it...
i hope this will help you to make yourself be active in terms of
persuation and networking, and at the same time, brainstorming and creativity.....
this wold be the prob:
a teacher has difficult time in computing the average grade of her 5 students, namely Joseph, Marvin, Antonio, Louis, and Mark. There average
grade will be computed by this format:
average grade = (FirstGrade + SecondGrade + ThirdGrade + FourthGrade) / 4
Make a program that can compute the average grade of each student of the teacher.
from red3warlord with gratitude always saying...
"never lie on the present
and make focus for the future..."