#include<stdio.h>
#include<conio.h>
void main(int argc,char *argv[])
{
FILE *fp,*fp1;
int i;
char oout[40];
fp=fopen(argv[1],"w");
for(i=3;i<argc;i++)
{
fprintf(fp,"%s\n",argv[i]);
}
fclose(fp);
fp=fopen(argv[1],"r");
fp1=fopen(argv[2],"w");
for(i=3;i<argc;i++)
{
fscanf(fp,"%s\n",out);
fprintf(fp1,"%s\n",out);
}
fclose(fp);
fclose(fp1);
}
#include<conio.h>
void main(int argc,char *argv[])
{
FILE *fp,*fp1;
int i;
char oout[40];
fp=fopen(argv[1],"w");
for(i=3;i<argc;i++)
{
fprintf(fp,"%s\n",argv[i]);
}
fclose(fp);
fp=fopen(argv[1],"r");
fp1=fopen(argv[2],"w");
for(i=3;i<argc;i++)
{
fscanf(fp,"%s\n",out);
fprintf(fp1,"%s\n",out);
}
fclose(fp);
fclose(fp1);
}
0 comments:
Post a Comment