子函数被调用,改错
#include"stdio.h"int myf1(char s[]);
void myf2(char s2[],char s1[]);
int myf3(char s1[],char s2[]);
void main()
{
char s1[20]={"i love beijing!"},s2[80]={"i love wuhan!"};
printf("%d\n",myf1(s1));
printf("%d\n",myf3(s1,s2));
myf2(s2,s1);
puts(s2);
}
int myf3(char s1[],char s2[])
{
int i;
for(i=0;s1[i]!='\0'||s2[i]!='\0';i++)
{
if(s1[i]<s2[i]) return -1;
else if(s1[i]>2[i]) return 1;
}
return 0;
}
void myf2(char s2[],char s1[])
{
int i;
for(i=0;s1[i]!='0';i++)
s2[i]=s1[i];
s2[i]='\0';
}
int myf1(char s[])
{
int i;
for(i=0;;i++)
{
if(s[i]=='\0') break;
}
return i;
}