Hi,
How can I move data from one file to the another file without using pointers. Plz give some code. Thnx
Hi,
How can I move data from one file to the another file without using pointers. Plz give some code. Thnx
One character at a time.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Here is some code
Code:c = fgetc(fp1); fputc(c, fp2);
In that example, c99tutorial, both fp1 and fp2 would be pointers.....
True. Okay, let's simplify to
Then it is your responsibility to call the program like thisCode:c = getchar(); putchar(c);
Code:copybytes < file1 > file2
complete program plz................?
If you can't put int main() around either of c99tutorial's posts after a whole day, then you should probably give up programming as a career choice.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Moving data from one file to another can be accomplished easily with rename. Unfortunately, that accepts two pointers to const-qualified char, which doesn't seem to satisfy your criteria. That doesn't really matter anyway, because your requirement of using 'no pointers' is difficult and impossible from a few perspectives.