This looks like a simple question, but I didn\'t find anything similar here.
Since there is no file copy function in C, we have to implement file copying ourselves,
Here is a very easy and clear example: Copy a file. Since it is written in ANSI-C without any particular function calls I think this one would be pretty much portable.