![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
[单选题]
若有如下程序: int s[3] [3]={'a','b','C','d','e','f','g','h','i'},*t; main() {t:(int*)malloc(sizeof(int)); sub(t,s); printf("%c\n",*t); } sub(int*p,int b[][3]) {*p=b[2][1]; } 则程序运行后的输出结果是()。
A.d
B.e
C.h
D.b
查看答案
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)
A.d
B.e
C.h
D.b
A.=0
B.=1
C.=2
D.=3
A.0
B. 1
C. 3
D. 6
有以下程序
#include<stdio.h>
void fun(int *s)
{ static int j=0;
do { s[j]=s[j]+s[j+1]; )while(j<2);
}
main()
{ int k,a[10]={1,2,3,4,5);
for(k=1;k<3;k++)fun(a);
for(k=0;k<5;k++)printf(”%d”,a[k]);
printf("\n");
}
程序运行后的输出结果是
A) 12345
B)23445
C)34756
D) 35745
A.x=10, y=20, z=30
B.x=20, y=30, z=30
C.x=20, y=30, z=10
D.x=20, y=30, z=20
A.1 3 4 6 7 9
B.1 2 0 3 5 6
C.1 2 3 4 5 4
D.1 3 4 5 1 1
A.3 3
B.6 3
C.4 6
D.10 4
A.5
B.6
C.7
D.8