若将子过程SUB中的PRIVATE X改为PRIVATE Y,则X的输出结果为 ______。A.5B.11C.8D.3

若将子过程SUB中的PRIVATE X改为PRIVATE Y,则X的输出结果为 ______。

A.5

B.11

C.8

D.3


相关考题:

若将X=3改为X=12时,X的输出结果为 ______。A.6B.9C.12D.无任何显示

完成下列类的构造函数,初始化语句为______。 include class Test { private: int x,y 完成下列类的构造函数,初始化语句为______。include<iostream.h>class Test{private:int x,y;public:void Test(int initx,int inity){______}void printx( ){cout<<x<<"-"<<y<<"="<<x-y;}};void main( ){Test x(300,200);x.printx( );}

若将子过程SUB中的PRIVATE X改为PRIVATE Y,则Y的输出结果为 ______。A.5B.11C.8D.3

有以下程序:include using namespace std;class sample{private: int x; static int 有以下程序:#include <iostream>using namespace std;class sample{private: int x; static int y;public: sample(int a); static void print(sample s);};sample:: sample(int a){ x=a; y+=x;}void sample:: print(sample s){ cout<<"x="<<s. x<<",y="<<y<<end1;}int sample:: y=0;int main(){ sample s1(10); sample s2(20); sample:: print(s2); return 0;}程序运行后的输出结果是( )。A.x=10,y=20B.x=20,y=30C.x=30,y=20D.x=30,y=30

有以下程序:include include using namespace std;class Y;class X{private 有以下程序: #include <iostream> #include <string> using namespace std; class Y; class X { private: int x; char *strx; public: X(int a, char *str) { x=a; strx=new char[strlen(str)+1]; strcpy(strx,str); } void show(Y ob) ; }; class Y { private: int y; char *stry; public: Y(int b,char *str) { y=b; stry=new char[strlen(str)+1]; strcpy(stry, str); } friend void X: :show(Y ob) ; }; void X: :show(Y ob) { cout<<strx<<", "; cout<<ob, stry<<end1; } int main ( ) { X a(10,"X"); Y b (20, "Y"); a. show(B) ; return 0; } 执行后的输出结果是( )。A.X,YB.a,bC.X,XD.Y,Y

若将程序中的 删除,则X,Y的输出结果为 ______。A.0 2B.2 4C.6 6D.1 3

若将输出语句? X1+X2+X3改为?X1,X2,X3,且将子程序最后一行的TO MASTER 删除,则X1的输出结果为 ______。A.10B.11C.12D.13

若将输出语句? X1+X2+X3改为?X1,X2,X3,且将子程序最后一行的TO MASTER 删除,则X2的输出结果为 ______。A.10B.11C.12D.13

若将输出语句?X1+X2+X3改为? X1,X2,X3,且将子程序最后一行的TO MASTER 删除,则X3的输出结果为 ______。A.10B.11C.12D.13