#include
main()
{
FILE *fin, *fout;
int i,j,n;
char str[51][20];
fin=fopen("file.txt","r");
if (!fin){
printf("Can not open file.txt\n");
return 0;
};
n=0;
while(1){
fscanf(fin,"%s", str[n]);
if (feof(fin)) break;
n++;
};
fclose(fin);
for (i=0;i
strcpy(str[50],str[i]);strcpy(str[i],str[j]);strcpy(str[j],str[50]);
}
fout=fopen("file2.txt","w");
if (!fout){
printf("Can not open file2.txt\n");
return 0;
};
for (i=0;i
}