*}
codea teams

File Copy



int fcopy(char *in_name, char *out_name)
{
    FILE *infp;
    FILE *outfp;
    char buff[512];

    infp = fopen(in_name, "r");
    outfp = fopen(out_name, "w");

    while (fgets(buff, 512, infp))
    {
        fputs(buff, outfp);
    }
    fclose(infp);
    fclose(outfp);

    return SUCCESS;
    
}