⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpbin.c

📁 JPEG压缩和解压程序和一些相关的说明文档 内容比较全
💻 C
字号:
#include "stddef.h"#include "stdio.h"main(int argc,char *argv[]){  FILE *file1,*file2;  int count=0,start_position=0,diff=0,same=0,diffmeasure,diffmax=0;  if ((file1=fopen(argv[1],"rb"))==NULL)    printf("the %scan't  be opened",argv[1]);  if ((file2=fopen(argv[2],"rb"))==NULL)    printf("the %scan't  be opened",argv[2]);  {int c1,c2;  while(1){    count+=1;    if ((c1= fgetc(file1))==EOF || (c2=fgetc(file2))==EOF){      if (same==0)	printf("Di Nu:%d F:%d T%d\n",diff,start_position,count-1);      else        printf("Sa Nu:%d F:%d T%d\n",same,start_position,count-1);      printf("The max diff is %d.\n",diffmax);      printf("the count is %d\n",count-1);      printf("One of the file is over now\n");      return(0);    }    if ((diffmeasure=c1-c2)!=0){      diffmeasure =diffmeasure>=0 ? diffmeasure :-diffmeasure;      if (diffmeasure>diffmax)  diffmax=diffmeasure;       /*printf("c1=%d,c2=%d\n",c1,c2);*/      if (diff++==0){	/*printf("Sa Nu:%d F:%d T%d\n",same,start_position,count-1);*/	same=0;	start_position=count;      }    } else {	if (same++==0){          printf("Di Nu:%d F:%d T%d\n",diff,start_position,count-1);	  diff=0;	  start_position=count;	}      }           }      }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -