본문내용
}
fclose(fp);
return (line-1); /* Total line is line-1 because array index is started at 1. */
}
void writeOutfile(char *output_name, int *A, int line){
int j;
FILE *fp;
if((fp=fopen(output_name, \"w\")) == NULL){
fprintf(stderr, \"File opening error\");
exit (0);
}
for(j=1; j<=line; j++){
fprintf(fp, \"%d\\n\", A[j]);
}
fclose(fp);
}
void SWAP(int *a, int *b){
int temp;
temp = *a;
*a = *b;
*b = temp;
}
fclose(fp);
return (line-1); /* Total line is line-1 because array index is started at 1. */
}
void writeOutfile(char *output_name, int *A, int line){
int j;
FILE *fp;
if((fp=fopen(output_name, \"w\")) == NULL){
fprintf(stderr, \"File opening error\");
exit (0);
}
for(j=1; j<=line; j++){
fprintf(fp, \"%d\\n\", A[j]);
}
fclose(fp);
}
void SWAP(int *a, int *b){
int temp;
temp = *a;
*a = *b;
*b = temp;
}
소개글