单项选择题
下面程序的输出结果是( )。
#include <iostream>
using namespace Std;
int main()
int x[6]=1,3,5,7,9,11,*k,**s;
k=x;
s=&k;
cout<<*(k++)<< “,”<<**s<<end1;
return 0;
A) 3,3
B) 1,1
C) 3,5
D) 3,1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include<iostream> using namespace std; class Instrument public: virtual void Display( )=0; ; class Piano:public Instrument public: void Display( ) *函数体程序略* ; int, main( ) Instrument s; Instrument*p=0; ...; return 0; 下列叙述中正确的是
A) 语句“Insturment *p=0;”编译时出错
B) 语句“Instruments;”编译时出错
C) 类Piano中的Display函数不是虚函数
D) 类Instrumen七是一个虚基类
点击查看答案
单项选择题
若有如下程序: #include <iostream> using namespace std; int s=0; class sample static int n; public: sample(int i) n=i; static void add() s+=n; ; int sample::n=0; int main() sample a(2),b(5); sample::add(); cout<<s<<endl; return 0; 程序运行后的输出结果是( )。
A.2
B.5
C.7
D.3
点击查看答案
相关试题
下列程序对加号进行了重载,划线部分的语句...
当线性表采用顺序存储结构实现存储时,其主...
以下程序的输出结果是 【8】 。 #incl...
一个项目具有一个项目主管,一个项目主管可...
多态性分两类:编译时的多态性和______。