“`”

【参考答案】
main()
{
intlen;
char *s tr[20];
printf(""please input a string:\n"");
scanf(""%s"",str);
len=length(str);
printf(""the s tring has %d characters."",len);
getch();
}
length(p)
char <em>p;
{
int n ;
n=0;
while(</em>p!='\0')
{
n++;
p++;
}
return n;
}

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.