网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
下列程序的运行结果是【】。include class A{ int a, b; public: A() {a=b=0;} A(int

下列程序的运行结果是【 】。

include <iostream. h>

class A

{

int a, b;

public:

A() {a=b=0;}

A(int aa, int bb)

{

a=aa; b=bb;

cout<<a<<''<<b<<end1;

}

};

void main()

{ A x, y(2,3),z(4,5); }


参考答案

更多 “ 下列程序的运行结果是【】。include class A{ int a, b; public: A() {a=b=0;} A(int 下列程序的运行结果是【 】。include <iostream. h>class A{int a, b;public:A() {a=b=0;}A(int aa, int bb){a=aa; b=bb;cout<<a<<''<<b<<end1;}};void main(){ A x, y(2,3),z(4,5); } ” 相关考题
考题 下面程序的运行结果是includevoid fun(int * a,int * b){ int x= * a; * a = * b;* 下面程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int x= * a; * a = * b; * b=x; cout <<*a<< *b<<""; } void main( 0 { int x =1,y =2; fun(x,y); cout<< x << y <<end1; }A.12 12B.12 21C.21 12D.21 21

考题 下列程序的运行结果是()。includevoid fun (int *a,int*b){int*kk=a;a=b;b=k}void 下列程序的运行结果是( )。 #include< iostream.h> void fun (int *a,int*b) {int*k k=a;a=b;b=k} void main() {int a=2004, b=9,*x=a,*y=b; fun(x, y) ; cout<<a<<" "<<b<<endl:}A.20049B.92004C.0D.编译时出错

考题 下列程序的运行结果是 includeclass Location{private:int X.Y;public:void init(i 下列程序的运行结果是 #include<iostream.h> class Location{ private: int X.Y; public: void init(int=0,int=0); void valueX(int val){X=val;} int valueX( ){ return X;} void valueYA.5 0 6 4B.0 0 6 4C.5 0 6 2D.0 0 6 2

考题 下列程序的运行结果是includevoid fun(int * a,int * b){int * k; k=a; a=b; b=k;} 下列程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int * k; k=a; a=b; b=k; } void main( ) { int a=3,b=6, * x=a, * y=b; fun(x, y) ; cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.0 0

考题 下列程序的运行结果是()。includevoid fun(int *a, int *b) {int *k; k=a; a=b; b= 下列程序的运行结果是( )。#include<iostream.h>void fun(int *a, int *b) {int *k; k=a; a=b; b=k;}void main(){int a=2OO4,b=9,*x=a,*y=b;fun(x, y);cout<<a<<" "<<b<<end1;}A.20049B.92004C.0D.编译时出错

考题 有以下程序 include include int fun(int n) {int * 有以下程序 #include <stdio.h> #include <stdlib.h> int fun(int n) {int *p; p=(int*)malloc(sizeof(int)); *p=n; return *p; } { int a; a=fun(10); printf("%d\n",a+fun(10)); } 程序的运行结果是______。A.0B.10C.20D.出错

考题 下列程序的运行结果是includevoid fun(int *a,int *B){int *k;k=a;a=b;b=k;}void m 下列程序的运行结果是 #include<iostream.h> void fun(int *a,int *B) {int *k; k=a;a=b;b=k; } void main( ) {int a=3,b=6,*x=a,*y=b; fun(x,y); cout << a <<" "<< b; }A.63B.36C.编译出错D.0

考题 下列程序的运行结果是includevoid fun(int*a,int*b){int*k; k=a;a=b;b=k;}void mai 下列程序的运行结果是 #include<iostream.h> void fun(int*a,int*b) { int*k; k=a;a=b;b=k; } void main() { int a=3,b=6,*x=a,*y=b; fun(x,y); cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.O 0

考题 下列程序的运行结果是______。 include class Base { public: virtual void func(int 下列程序的运行结果是______。include<iostream.h>class Base{public:virtual void func(int i){cout<<"class Base:"<<i<<end1;)};class Derived: public Base{public:void func(double d){cout<<"class Derived:"<<d<<endl;}};void main( ){Base a,*p=a;Derived b;p=b;(*p).func(3.3);}