DESProcess FILE *mfp,*cfp int ttch=0,xorRes,ttbitdiff=0 char mch,cch float bdiff=0 if((mfp=fopen(mfile,"r"))==NULL) {cout<<"Cannot open the file to compare"<<endl } if((cfp=fopen(cfile,"r"))==NULL) {cout<<"Cannot open the file to compare"<<endl } else { while(!feof(mfp)&!feof(cfp)) { ttch++ mch=fgetc(mfp) cch=fgetc(cfp) xorRes=mch^cch ttbitdiff+=(xorRes&1)+(xorRes&2)/2+(xorRes&4)/4+(xorRes&8)/8+(xorRes&16)/16+(xorRes&32)/32+(xorRes&64)/64+(xorRes&128)/128 } bdiff=float(ttbitdiff)*100/float(ttch*8) } *bitdiff8byte=float(ttbitdiff)*100/float(8*8) return bdiff
标签: DESProcess ttbitdiff xorRes bdiff
上传时间: 2016-07-02
上传用户:1079836864
本文关键词: c++ 字符串 函数 char *strcpy(char *s1, const char *s2) 将字符串s2复制到字符串数组s1中,返回s1的值 char *strncpy(char *s1, const char *s2, size_t n) 将字符串s2中最多n个字符复制到字符串数组s1中,返回s1的值
上传时间: 2016-07-09
上传用户:lz4v4
indent为linux下代码自动格式化工具,可辨识C的原始代码文件,并加以格式化,以方便程序设计师阅读
上传时间: 2013-12-17
上传用户:lijinchuan
LCS,即最常公共子序列的的C语言解法。prepare_for_backdate(char,char,int,int)函数是为后面的回溯法求得最长公共子序列做准备,并可得到子序列长度。lcs(char,int,int)函数是输出子序列的。并用到了第一个函数的结果。因为要得到最终的子序列,要知道那些地方是可输出的位置,因此构造数组b[][],当为1时表明当前位置匹配,可输出,为2时需要往上回溯,为3时需要往左回溯,直到找到下一个为1的位置。而c[][]数组是保存找子序列过程中匹配位数。
标签: prepare_for_backdate char LCS C语言
上传时间: 2014-01-11
上传用户:yuchunhai1990
操作系统课程设计_进程调度演示源程序 #include "stdio.h" #include "stdlib.h" #include "string.h" typedef struct node { char name[10] /*进程标识符*/ int prio /*进程优先数*/ int round /*进程时间轮转时间片*/ int cputime /*进程占用CPU时间*/ int needtime /*进程到完成还要的时间*/ int count /*计数器*/ char state /*进程的状态*/ struct node *next /*链指针*/ }PCB
标签: include typedef stdlib string
上传时间: 2016-08-09
上传用户:凤临西北
数据结构 课程 2叉树的遍历 #include "stdafx.h" #include <iostream.h> typedef char elemtype
标签: include elemtype iostream typedef
上传时间: 2013-11-30
上传用户:tb_6877751
//通过18B20检测的数字温度可在电脑上显示当前温度值 #include <reg52.h> #define uchar unsigned char #define uint unsigned int sbit DS=P2^2 //define interface uint temp // variable of temperature uchar flag1 // sign of the result positive or negative sbit dula=P2^6 sbit wela=P2^7
标签: define unsigned include 18B20
上传时间: 2014-01-19
上传用户:Andy123456
//1602液晶显示字屏为:TX-1C MCU GOTOYUNLONGDZ #include<reg52.h> #define uchar unsigned char #define uint unsigned int
标签: GOTOYUNLONGDZ unsigned include define
上传时间: 2014-11-14
上传用户:caiiicc
Philip tea 5767 FM 驱动用应用程序 char FM_Init(char bandinfo, char softlev)
标签: char bandinfo FM_Init softlev
上传时间: 2013-12-28
上传用户:zhuyibin
Abstract A new intelligent milometer base on a microcontroller can count the sum. By taking full use of the processor 89s51 and E² PROM (AT24C02) and sensor of magnetism, it can count the sum of fully distance and the course of development.
标签: microcontroller intelligent milometer Abstract
上传时间: 2016-10-12
上传用户:hoperingcong