单项选择题
若类A和类B的定义如下:
class A
public:
int i,j;
void get();
;
class B:A
int i, j;
protected;
int k;
public:
void make();
;
void B: :make()(k=i*j;
则其中 ______ 是非法的表达式。
A.void get();
B.int k;
C.void make();
D.k=i*j;
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
以下程序的执行后,x和y的值是 ______ 。 #include <iostream. h> class Sample public: int x; int y; void disp() cout<< x= <<x<< , y= <<y<<end1; ; void main() int Sample: :*pc; Sample s; pc=&Sample:: x; s. *pc=10; pc=&Sample: :y; s. *pc=.20; s. disp ();
A.x=10, y=20
B.x=20, y=10
C.x=10, y=10
D.x=20, y=20
点击查看答案
单项选择题
设x为int的变量,不能正确表达数学关系10<x<15的表达式是 ______。
A.10<x<15
B.x==1||x==12||x==13||x==14
C.x>10&&x<15
D.!(x<=10)&&!(x>=15)
点击查看答案
相关试题
在下面程序运行 #include<iostream.h>...
下面程序的结果是 ______。 #incl...