This also sounds like homework, and my bet is that they don't want you to call the system's copy function, rather they want you to open the two files in binary and read from one and write to the other.
Read the man pages for, fopen, fread, fwrite, and fclose. You can figure out the number of bytes you need to copy with fseek and ftell.
Or, hey, just Google search the source for the cp function :).