南开大学 / 程序设计基础(下)
正确率:100%
下面程序段中,说法正确的是()。 class location{public:int GetX();};class rectangle;private location{public:int GetW();}
A.类rectangle的私有派生类是location
B.类rectangle中的public成员在类location中是私有的
C.类location中的public成员在类rectangle中是不可访问的
D.viod f(){Rectangle r; int X=r.GetX();} 其中int X=r.GetX();是非法语句
参考答案:
佳题速递: