问题
单项选择题
以下程序的输出结果是( )。
#include<iostream.h>
int fun (char*s)
char *p=s;
while (*p!='\0,) p++:
return (p-s):
void main()
cout<<fun (" ABCDEF ")<<endl:
A.3
B.6
C.8
D.0
答案
参考答案:B
以下程序的输出结果是( )。
#include<iostream.h>
int fun (char*s)
char *p=s;
while (*p!='\0,) p++:
return (p-s):
void main()
cout<<fun (" ABCDEF ")<<endl:
A.3
B.6
C.8
D.0
参考答案:B