单项选择题

以下程序的输出结果是( )。
#include<stdio.h>
main()
int a[3][3]=0,1,2,0,1,2,0,1,2,i,j,s=1;
for(i=0;i<3;i++)
for(j=i;j<=i;j++)
s+=a[i][a[j][j]];
printf("%d\n",s);

A.3
B.4
C.1
D.9
<上一题 目录 下一题>
热门 试题

单项选择题
若有代数式,(其中P仅代表自然对数的底数,不是变量),则下列能够正确表示该代数式的C语言表达式是( )。
A.sqrt(abs(n^x+e^x))
B.sqrt(fabs(pow(n,x)+pow(x,e)))
C.sqrt(fabs(pow(n,x)+exp(x)))
D.sqrt(fabs(pow(x,n)+exp(x)))
单项选择题
若有以下程序段: struct st int n; int*m;; int a=2,b=3,c=5; struct st s[3]=(101,&a,102,&c,103,&b; main() struct st*p; p=s; … 则以下表达式中值为5的是( )。
A.(p++)->m
B.*(p++)->m
C.(*p).m
D.*(++p)->m
相关试题
  • 运行下列程序时,若输入数据为“321”,...
  • 有以下程序: #include<stdio.h> int...
  • 以下程序中函数sort的功能足对a数组中的数...
  • 下列程序的运行结果是( )。 #include...
  • 在数据库系统的内部结构体系中,索引属于(...