is this what you are looking for?

Code:
#include <stdio.h>


/* Main program */

int main (int argc, char * argv[])
{
   FILE * fin, * fout;
   unsigned char buffer[1000];
   size_t count;

   fin = fopen(argv[1], "rb");
   if (fin == NULL)
      return 1;

   fout = fopen(argv[2], "wb");
   if (fout == NULL)
      return 2;
      
   while (!feof(fin)) {
      count = fread(buffer, 1, 1000, fin);
      fwrite(buffer, 1, count, fout);
   }

   fclose(fin);
   fclose(fout);

   return 0;
}