题库 第5921页
单选题:If you enter 1 0, what is the output of the following code?
If you enter 1 0, what is the output of the following code? @[D](2)```C++#include "iostream"using namespace std;int ma…
单选题:What is wrong in the following code?
What is wrong in the following code?``` vector v; v[0] = 2.5; @[C](2)```A. The program has a compile error because t…
单选题:Suppose Exception2 is derived from Exception1. Analyze the follo
Suppose Exception2 is derived from Exception1. Analyze the following code. @[A](2)try { statement1; statement2;…
单选题:Suppose that statement2 throws an exception of type Exception2 i
Suppose that statement2 throws an exception of type Exception2 in the following statement: @[D](2)try { statement1;…
单选题:Which of the following statements are true?
Which of the following statements are true? @[A](2)A. A custom exception class is just like a regular class. B. A cu…
单选题:下列不能被定义为变量名的是( )
下列不能被定义为变量名的是( ) @[B](2)A. numB. 1_result C. my D. name9A.numB.1_resultC.myD.name9答案:B…
单选题:为了避免嵌套的if-else语句的二义性,C语言规定else总是与( )组成配对关系
为了避免嵌套的if-else语句的二义性,C语言规定else总是与( )组成配对关系 @[C](2)A. 缩排位置相同的ifB. 在其之前未配对的ifC. 在其之前未配对的最近的ifD. 同一行上的ifA.缩排位置相同的ifB.在其…
单选题:若有以下变量定义:int b=2; float a=5;则表达式“a/b”之值为( )
若有以下变量定义:int b=2; float a=5;则表达式“a/b”之值为( ) @[A](2)A. 2.5B. 2C. 3D. 5/2A.2.5B.2C.3D.5/2答案:A…
单选题:C语言中,要求运算对象必须是整型数据的运算符是( )
C语言中,要求运算对象必须是整型数据的运算符是( ) @[A](2)A. %B. /C. \D. %和/A.%B./C.\D.%和/答案:A…
单选题:有如下的语句:scanf("a=%d,b=%d,c=%d",&a,&b,&c);为使变量a的值为1,b的值为2,c的值为3,从键
有如下的语句:scanf("a=%d,b=%d,c=%d",&a,&b,&c);为使变量a的值为1,b的值为2,c的值为3,从键盘输入数据的正确形式是( ) @[C](2)A. 1,2,3B. 1,3,2 C. a=1,b=2,c=…