单项选择题

定义如下变量和数组:
int k;
int a[3][3]={9,8,7,6,5,4,3,2,1};
则下面语句的输出结果是
for(k=0;k<3;k++)printf('%d',a[k][k]);
A.7 5 3
B.9 5 1
C.9 6 3
D.7 4 1

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

单项选择题
若有以下语句,则正确的描述是 char a[]='toyou'; char b[]={′t′,′o′,′y′,′o′,′u′};A.a数组和b数组的长度相同 B.a数组长度小于b数组长度 C.a数组长度大于b数组长度 D.a数组等价于b数组
A.a数组和b数组的长度相同
B.a数组长度小于b数组长度
C.a数组长度大于b数组长度
D.a数组等价于b数组
单项选择题
已知学生记录描述为: struct student { int no; char name[20],sex; struct { int year,month,day; } birth; }; struct student s; 设变量s中的'生日'是'1984年11月12日',对'birth'正确赋值的程序段是A.year=1984;month=11;day=12; B.s.year=1984;s.month=11;s.day=12; C.birth.year=1984;birth.month=11;birth.day=12; D.s.birth.year=1984;s.birth.month=11;s.birth.day=12;
A.year=1984;month=11;day=12;
B.s.year=1984;s.month=11;s.day=12;
C.birth.year=1984;birth.month=11;birth.day=12;
D.s.birth.year=1984;s.birth.month=11;s.birth.day=12;
相关试题
  • 某机床的主轴和润滑油泵各由一只笼型异步电...
  • 试设计一个工作台前进—退回的控制线路。工...
  • 试画出既能使三相异步电动机正、反连续运行...
  • The main idea of the story is tha...
  • When we dream,().