int i,bSame;bSame=1;for ( i=0,p=a,q=b;i<41;i++,p++,q++ ) if ( *p != *q ) { bSame=0; break; } if ( bSame ) printf("数组相同\n"); else printf("数组不相同\n");} 逐位比较c数组存放不同的位,不同位取1:include<stdio.h> void main(){ unsigned int ...
include<stdio.h> int compare(char a[100],char b[100])//定义一个比较两个字符串函数a[100], b[100]分别是形参 { int i,j;for(i=0;a[i]!='\0'||b[i]!='\0';i++)if(a[i]!=b[i]){ j=(a[i]-'0')-(b[i]-'0');return(j);} return(0);} void main(){ c...