- 15
- 0
- 约2.21千字
- 约 3页
- 2021-12-10 发布于福建
- 举报
#include stdafx.h
#include stdio.h
#include malloc.h
#include string.h
/*
程序实现:将文件 A B 中合并,排序后将结果合并到文件 C 中
实现思路:先求文件长度,然后再讲数据读入到内存中,然后用冒泡算法排序
程序如果有什么错误,还希望大家多多批评
*/
static FILE *fp;
int GetLength(char *name)
{
int len;
if ((fp=fopen(name,r))==NULL)
{
printf(cannot open the file\n);
return 0;
}
else
{
fseek(fp,0,SEEK_END);
len = ftell(fp);
}
return len;
}
void write(char *name,char *buffer,int size)//
原创力文档

文档评论(0)