Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
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.
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.