单项选择题
以下程序的输出结果是( )。
#include <iostream.h>
Void main()
int a[3][3]=1,2),3,4,5,6i,j,s=0;
for(i=1;i<3;i++)
for(j=0;j<i;j++) s+=a[i][j];
cout<<s<<endl;
A.14
B.19
C.20
D.21
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include <iostream> using namespace std; class Point public: static int number; public: Point() number++; ~Point() number--; ; int Point::number=0; void main() Point *ptr; Point A,B; Point* ptr_point=new Point[3]; ptr=ptr_point; Point C; cout<<Point::number<<endl; delete []ptr; 运行时输出的结果是
A.3
B.4
C.6
D.7
点击查看答案
单项选择题
下列描述中,错误的是( )。
A.公有继承时基类中的公有成员在派生类中仍是公有成员
B.公有继承时基类中的保护成员在派生类中仍是保护成员
C.保护继承时基类中的公有成员在派生类中仍是公有成员
D.保护继承时基类中的保护成员在派生类中仍是保护成员
点击查看答案
相关试题
下面程序的运行结果是______。 #in...
在下面横线上填上适当的语句,完成程序。 ...
下列程序的输出结果是______。 #in...
已知数组a中的元素个数为n,下列语句的作用...
有如下程序: #include <iostream.h>...