题目内容
(请给出正确答案)
[单选题]
以下()表达式产生一个0~7之间(含0,7)的随机整数()
A.Math.floor(Math.random()*6)
B.Math.floor(Math.random()*7)
C.Math.floor(Math.random()*8)
D.Math.ceil(Math.random()*8)
查看答案
如果结果不匹配,请 联系老师 获取答案
A.Math.floor(Math.random()*6)
B.Math.floor(Math.random()*7)
C.Math.floor(Math.random()*8)
D.Math.ceil(Math.random()*8)
A.Math.foor(MthtandomQ()*0)
B.Math. foor(MathrandomQ()*7)
C.Math. foor(Math. random()*8)
D.Math cal(Math. random()*8)
A.Math.floor(Math.random()*6)
B.Math.floor(Math.random()*7)
C.Math.floor(Math.random()*8)
D.Math.floor(Math.random())
设有定义:int a=0,b=1;,以下表达式中,会产生“短路”现象,致使变量b的值不变的是
A.a++&&b++
B.a++||++b
C.++a&&b++
D.+a ||++b
A.sizeof(p)
B.sizeof(char)
C.sizeof(*q)
D.sizeof(p[0])
A.“条件”可以是关系表达式、逻辑表达式或常数
B.循环体中可以使用Exit Do语句
C.若“条件”是一个为0的常数,则一次也不执行循环体
D.如果“条件”总是为True,则不停地执行循环体
A.“?”是条件运算符
B.“?”是关系运算符
C.“?”前的表达式为真时,z=0
D.“?”前的表达式为假时,z=0