主题:求高手,看一下错在哪@ @
编写函数strlength(),求字符串长度
#int strlength (char*str)
{char*p;
p=str;
int count=0;
while(*p!="\0")
{P++;count++;}
return count;
}
{char arr[20]="Hello")
printf("%d",strlength arr);
}
#int strlength (char*str)
{char*p;
p=str;
int count=0;
while(*p!="\0")
{P++;count++;}
return count;
}
{char arr[20]="Hello")
printf("%d",strlength arr);
}