单项选择题
有以下程序段:
#include <stdio.h>
#include <string.h>
main()
char a[3][20]="china"), "isa", "bigcountry!";
char k[100]=0, *p=k;
int i;
for(i=0; i<3; i++)
p=strcat(p, a[i]);
i=strlen(p);
printf("%d\n", i);
则程序段的输出结果是( )。
A) 18
B) 19
C) 20
D) 21
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include <stdio.h> fun(int x) int p; if(x==0||x==1) return(3); p=x-fun(x-2); return p; main() printf( %d n , fun(7) ); 执行后的输出结果是( )。
A) 7
B) 3
C) 2
D) 0
点击查看答案&解析
单项选择题
有以下程序: #include <stdio.h> main() char *p[10]= 123 , aabdfg , dcdbe , abbd , cd ; printf( %d n , strlen(p[4]) ); 执行后的输出结果是( )。
A) 2
B) 3
C) 4
D) 5
点击查看答案&解析
相关试题
i
a[j]
下列给定程序中,函数fun的功能是:按以下...
规定输入的字符串中只包含字母和*号。请编...
a[i]%2