问题
单项选择题
下面程序的输出结果是( )。
#include <stdio.h>
f(char *s)
char *p=s;
while(*p!'\0')
p++;
return(p-s);
main()
printf("%d\n",f("ABCDEF"));
A.3
B.6
C.8
D.0
答案
参考答案:B
下面程序的输出结果是( )。
#include <stdio.h>
f(char *s)
char *p=s;
while(*p!'\0')
p++;
return(p-s);
main()
printf("%d\n",f("ABCDEF"));
A.3
B.6
C.8
D.0
参考答案:B