题目内容
(请给出正确答案)
[单选题]
以下程序的运行结果是()。voidmain(){inta;if(a=6)printf("%d/n",a);elseif(a>6)printf("%d/n",a+2);elseprintf("%d/n",a+3);}
A.运行时产生错误信息
B.9
C.8
D.6
答案
查看答案
A.运行时产生错误信息
B.9
C.8
D.6
第2题
A.a
B.b
C.c
D.d
第3题
A.输出lisa
B.输出null
C.输出name
D.编译失败,无法从静态上下文中引用非静态变量name
第4题
A.86420
B.975311
C.97531
D.864200
第6题
以下程序#include "stdio、h"main(){ char *p="ABCDEF",*q;q=p+3;printf("%s/n",q);}的输出结果是()。
第7题
A.5
B.4
C.6
D.不确定
第8题
以下程序运行结果的第十行为()。 for i in "abc": for j in range(1,11): print("{}{}".format(i,j))
第10题
运行以下程序f=open('c://xxy//result.txt','w') f.write('hello/nworld') f.close()后,文件result.txt中的内容为()
A.helloworld
B.hello world
C.hello / n world
D.hello /n world