单项选择题

若有以下程序:
#include <iostream>
using namespace Std;
int main()

int i ;
int a[3] [3] = ’1’,’2’,’3’,’4’,’5’,’6’,’7’,’8’,’9’;
for(i=0;i<3;i++)
cout<<a[i] [1]<<" ";
cout<<end1;
return 0;

执行后的输出结果是( )。

A.50 53 56
B.49 52 55
C.2 5 8
D.1 4 7
<上一题 目录 下一题>
热门 试题

单项选择题
若有以下程序: #include <iostream> using namespace std; class Base private: int a,b; public: Base(int x, int y) a=x; b=y; void show() cout<<a<< , <<b<<end1; ; class Derive : public Base private: int c, d; public: Derive(int x,int y, int z,int m):Base(x,y) c=z; d=m; void show() cout<<c<< , <<d<<end1; ; int main () Base b(50,50),*pb; Derive d(10,20,30, 40); pb=&d; pb->show (); return 0; 招待程序后的输出结果是( )。
A.10,20
B.30,40
C.20,30
D.50,50
单项选择题
若有以下程序: #include <iostream> using namespace Std; class sample int i; publiC: sample() void setvalue(int m) i=m; void fun(int m) i+=m; void disp() cout<<i<<end1; ; int main() sample *ps; ps=new sample; ps->setvalue(20); ps->fun(5); ps->disp(); return 0; 程序运行后,输出的结果是( )。
A.15
B.20
C.25
D.30
相关试题
  • 信息隐蔽的概念与下述哪一种概念直接相关(...
  • 模板函数的真正代码是在( )时候产生。
  • 算法的时间复杂度是指( )。
  • 派生类的构造函数的成员初始化列表中,不能...
  • 下面各选项中,属于非法的C++整型常量的...