编译无法通过
int sf(char *s1, char *s2){ while(*s1==*s2){
if(*s1==0)return 0;/*比较两个字符数组的大小*/
s1++;
s2++;
}
return (*s1-*s2);
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int sf(char *s1,char *s2);
char *s1,*s2;
int i.n,m;
for(i=1;i<3;i++)
printf("请输入第%d个数组长度\n",i);
scanf("%d %d",&n,&m);
s1=(char*)calloc(n+1,sizeof(char));
s1=(char*)calloc(m+1,sizeof(char));
scanf("%s\n%s",s1,s2);
sf(s1,s2);
}