题目内容

下列程序的输出结果是________#include int main ( ){char a[10]= {9,8,7,6,5,4,3,2,1,0},*p=a+5;printf("%d",*--p);return 0;}

A. 非法
B. a[4]的地址
C. 4
D. 5

查看答案
更多问题

下面程序的输出结果是________#include int main(){int a[ ]= {1,2,3,4,5,6,7,8,9,0,},*p;p=a;printf("%d\n",*p+9);return 0;}

A. 0
B. 1
C. 9
D. 10

以下程序的输出结果是_________#include int main(){int i, x[3][3]= {1,2,3,4,5,6,7,8,9};for(i=0; i<3; i++) printf("%d,",x[i][2-i]);return 0;}

A. 1,4,7,
B. 1,5,9,
C. 3,5,7,
D. 3,6,9,

以下程序的输出结果是_________#include int main(){int a[3][3]= { {1,2},{3,4},{5,6} },i,j,s=0;for(i=1; i<3; i++)for(j=0; j<=i; j++)s+=a[i][j];printf("%d\n",s);return 0;}

A. 18
B. 19
C. 20
D. 21

以下定义语句中,错误的是___________

A. int a[]={1,2};
B. char *a[3];
C. char s[10]="test";
D. int n;float a[n];

答案查题题库