单项选择题

有如下类的定义。空格处的语句是( )。
class MyClass

____________ int x, y;
public:
MyClass(int a=0,int b=0)

x=a;
y=b;

static void change()

x-=10;
y-=10;

;

A.static
B.const
C.private
D.不需要填入内容
<上一题 目录 下一题>
热门 试题

单项选择题
若有以下程序: #include <iostream> using namespace std; class Base int x; protected: int y; public: int z; void setx(int i) x=i; int getx ( ) return x; ; class Inherit : private Base private: int m; public: int p; void setvalue(int a,int b,int c, int d) setx(
A.;
&n
单项选择题
已知枚举类型定义语句为: enum Token NAME,NUMBER,PLUS=5,MINUS,PRINT=10; 则下列说法中,错误的是( )。
A.枚举常量NAME的值为1
B.枚举常量NUMBER的值为1
C.枚举常量MINUS的值为6
D.枚举常量PRINT的值为10
相关试题
  • 若有以下程序: #include <iostream>...
  • 下列程序将x、y和z按从小到大的顺序排列,...
  • 以下程序运行后的输出结果是 【14】 。...
  • 表达式operator++(x,int)还可以表示为...
  • 要想把类的一般成员函数说明为类的常成员函...