柠檬试题库
search
首页
计算机
公务员
驾照
关于
share
有以下程序 #include
main() { int i, t[][3]={9,8,7,6,5,4,3,2,1}; for(i=0;i<3;i++) printf("%d ",t[2-i][i]); } 程序执行后的输出结果是
A.3 5 7
B.7 5 3
C.3 6 9
D.7 5 1
热度🔥1,733
参考答案:A
解析:
【解析】该题中t[][3]={9,8,7,6,5,4,3,2,1};实际上就是t[3][3]= {{9,8,7},{6,5,4},{3,2,1}};,通过for循环语句,确定需要输出t[2][0],t[1][1]和t[0][2],即输出3、5、7。 因此A选项正确。
复制题目向AI提问
content_copy
content_copy
扫码免费计算机二级刷题
2025年计算机等级考试题库
推荐
下列关于C语言文件的叙述中正确的是
有以下程序 #include #include typedef struct stu { char name[10]; char gender; int score; } STU; void f(char *name, char gender, int score) { strcpy(name, "Qian"); gender = 'f'; score = 350; } main() { STU a={"Zhao", 'm', 290}, b; b=a; f(b.name,b.gender,b.score); printf("%s,%c,%d,", a.name, a.gender, a.score); printf("%s,%c,%d\n", b.name, b.gender, b.score); } 程序的运行结果是
将Cisco路由器的配置保存在NVRAM中,正确的命令是()。
每家医院都有一名院长,而每个院长只能在一家医院任职,则实体医院和实体院长之间的联系是( )。
现代微型计算机中所采用的电子元器件是( )。
标签
二级C语言
输出
for
程序
main