单项选择题
有以下程序:
#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
热门
试题
单项选择题
有以下程序: #include <stdio.h> main() int i, s=0, t[]=1, 2, 3, 4, 5, 6, 7, 8, 9; for(i=0; i<9; i+=2)s+=*(t+i); printf( %d n , s); 程序执行后的输出结果是( )。
A) 45
B) 20
C) 25
D) 36
单项选择题
以下数组定义中错误的是( )。 A) int x[][3]=0; B) int x[2][3]=1, 2, 3, 4, 5, 6; C) int x[][3]=1, 2, 3, 4, 5, 6; D) int x[2][3]=1, 2, 3, 4, 5, 6;