单项选择题

下面程序的输出结果是( )。
#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
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: void swap1(int c[]) int t; t=c[0];c[0]=c[1];c[1]=t; int swap2(int c0, int c1) int t; t=c0; c0=c1; c1=t, return c1; main() int a[2]=3,5,b[2]=3,5; swapl(a); b[1]=swap2(b[0],b[1]); printf( %d %d %d %d n ,a[0],a[1],b[0],b[1]); 其输出结果是( )。
A.5 3 3 3
B.5 3 3 5
C.3 5 3 5
D.3 5 5 3
单项选择题
下面函数的功能是( )。 a(s1,s2) char s1[],s2[]; while(s2++=s1++);
A.字符串比较
B.字符串复制
C.字符串链接
D.字符串反向
相关试题
  • 有以下程序: # include <stdio.h>...
  • 有以下程序: struct STU char name[...
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: #include <stdio.h> i...
  • 下面程序的输出结果是( )。 main() ...