单项选择题
有如下程序:
#include <iostream>
using namespace std;
class Test
public:
Test() n+=2;
~Test() n-=3;
static int getNum()retum n;
private:
static int n;
;
int Test:: n=1;
int main()
Test*p=new Test;
delete p;
cout<<"n="<<Test:: getNum()<<end1;
return 0;
;
执行后的输出结果是______.
A.n=0
B.n=1
C.n=2
D.n=3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include <iostream> void fun (int& x,int y)int t=x;x=y;y=t; int main() int a [2]=23,42; fun (a[1],a[0]; std::cout<<a[0]<<”,”<<a[1]<<std:: ond1; retum0; 执行后的输出结果是______ 。
A.41,41
B.23,23
C.13,42
D.42,23
点击查看答案&解析
单项选择题
下列叙述中正确的是______ 。
A.一个逻辑数据结构只能有一种存储结构
B.数据的逻辑结构属于线性结构,存储结构属于非线性结构
C.一个逻辑数据结构可以有多种存储结构,且各种存储结构不影响数据处理的效率
D.一个逻辑数据结构可以有多种存储结构,且各种存储结构影响数据处理的效率
点击查看答案&解析
相关试题
有如下程序: #include <iostream> u...
有如下程序: #include <iostream> u...
有如下类声明: class MyBASE int k;...
有如下程序: #include <iostream> u...
有如下程序: #include<iostream> usi...