单项选择题
有以下程序:
#include <iostream>
using namespace std;
int main()
int x=15;
while(x>10&&x<50)
x++;
if(x/3)
x++; break;
cout<<x<<end1;
return 0;
执行后的输出结果是( )。
A.15
B.16
C.17
D.18
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序的输出结果是( )。 #include<iostream> using namespace std; int main() int a=2,b=-1,c=2; if(a<b) if(b<0) c=0; else c+=1; cout<<c<<end1; return 0;
A.0
B.1
C.2
D.3
点击查看答案&解析
单项选择题
有以下程序: #include <iostream> using namespace std; class BASE private: char c; public: BASE(char n):c(n); virtual~BASE() cout<<c; ; class DERIVED:public BASE char c; public: DERIVED(char n):BASE(n+1),c(n) ~DERIVED()cout<<c; ; int main() DERIVED obj(’X’); return 0; 执行上面的程序将输出( )。
A.XY
B.YX
C.X
D.Y
点击查看答案&解析
相关试题
在下列程序画线处填入的正确语句是( )。...
有如下程序: #include <iostream> u...
下面程序的输出结果是( )。 #include...
对于下面定义的类MyClass,在函数f()中将...
有以下程序: #include <iostream> u...