No exact rules, as long as you make exact binary copy of the file. You can use the following steps:
1. Open the source file in binary mode with fopen(... rb ).
2. Open the new file buffer, i.e. destination file with fopen(... wb).
3. Copy the contents by utilizing the file handle from step 1 and 2. You can use read(...) and write(...) or other C library function for that.
hi,
which platform u r programming?
if u r use windows u can use from it's API for it
(CopyFile & CopyFileEx)
and in pure C u can use fread and fwrite but u should use "rb" and "wb" for opening files. if want i send u source code.