#include
#include
#include
#define BUFFSIZE 512;
int main(int argc, char **argv){
FILE *fin = NULL,*fout = NULL;
char *buf1= NULL;
char ch;
int state = 0;
int i=0;
if(argc < 3)
{
printf("没找到文件!\n");
return 0;
}
else{
if (!(fin = fopen(argv[1],"r")))
{
printf("打开输入文件错误!\n");
return 1;
}
if (!(fout = fopen(argv[2],"w")))
{
printf("打开输出文件错误!\n");
return 2;
}
buf1 = (char *)malloc(BUFFSIZE);
memset(buf1,"/0",BUFFSIZE);
ch = fgetc(fin);
strncpy(&buf1[i++],&ch,1);
fprintf(fout,"%s\t%s\n","NUM",buf1);
return 0;
}