【单选题】【消耗次数:1】
C++中类的成员默认为
public
private
protected
static
参考答案:
复制
纠错
相关题目
【单选题】 C++中类的成员默认为
①  public
②  private
③  protected
④  static
【单选题】 如没有使用private关键字定义类的数据成员,则默认为( )
①  private
②  public
③  protected
④  friend
【单选题】 如没有使用private关键字定义类的数据成员,则默认为( )
①  private
②  public
③  protected
④  friend
【单选题】 类中定义的成员默认为()访问属性。
①  public
②  private
③  protected
④  friend
【单选题】 声明成员变量时,如果不使用任何访问控制符(public, protected, private),则以下哪种类型的类不能对该成员进行直接访问 ( )
①  同一类
②  同一包中的子类
③  同一包中的非子类
④  不同包中的子类
【单选题】 在哪种派生方式中,派生类可以访问基类中的protected成员( )
①  public和private
②  public和protected
③  protected和private
④  仅protected
【单选题】 在哪种派生方式中,派生类可以访问基类中的protected成员( )
①  public和private
②  public和protected
③  protected和private
④  仅protected
【单选题】 以下程序的运行结果是:( ) public class Increment{ public static void main(String args[]){ int c; c = 2; System.out.println(@@; System.out.println(c++); System.out.println(@@; } }
①  2 2 2
②  2 3 3
③  2 2 3
④  3 4 4
【单选题】 C++类体系中,不能被派生类继承的有()
①  常成员函数
②  构造函数
③  虚函数
④  静态成员函数
【单选题】 C++类体系中,不能被派生类继承的有( )
①  构造函数
②  虚函数
③  静态成员函数
④  赋值操作函数
随机题目
【单选题】 You look_______. What _______ you _______?
①  tire, did,do
②  tiring, have,done
③  tired, have,been doing
【单选题】 I am so tired that I spend one day _______.
①  to sleep
②  sleeping
③  sleeps
【判断题】 You’ve misspelled this word again. You’d better look it up.
①  正确
②  错误
【判断题】 A: Hello, is that Anna? B: Sorry, There’s no one named Anna here.
①  正确
②  错误
【判断题】 I started looking after these plants whose host went out to have a holiday.
①  正确
②  错误
【判断题】 A: This is Frank speaking. I would like to speak with Mr. Wang, please. B: I’m afraid you’ve dialed the wrong number.
①  正确
②  错误
【判断题】 The cinema is built last year.
①  正确
②  错误
【单选题】 _______ sports, I like drawing and playing the piano.
①  In addition
②  As well
③  Apart from
【单选题】 If I can get a pay raise, I _______ buy a house.
①  /
②  will
③  would
【单选题】 If you_______have a rest, you will have a bad cough.
①  won’t
②  wouldn’t
③  don’t