#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fpr, *fpw;
char ch;
{
FILE *fpr, *fpw;
char ch;
if (argc != 3)
{
printf("argument is error\n");
return -1;
}
{
printf("argument is error\n");
return -1;
}
if ((fpr = fopen(argv[1], "r")) == NULL)
{
printf("open source is error\n");
return -1;
}
{
printf("open source is error\n");
return -1;
}
printf("file number is %d\n", fpr->_fileno);
if ((fpw = fopen(argv[2], "w")) == NULL)
{
printf("open target is error\n");
return -1;
}
{
printf("open target is error\n");
return -1;
}
ch = getc(fpr);
while (ch != EOF)
{
fputc(ch, fpw);
ch = getc(fpr);
}
while (ch != EOF)
{
fputc(ch, fpw);
ch = getc(fpr);
}
return 0;
}
}