MULTIPLE CHOICE QUESTIONS AND ANSWERS
  1. True/False: The data members of the class have to be only variables. They cannot be declared as constants.

    Answer: False

  2. True/False: Pre-processor directives are terminated with semicolon.

    Answer: False

  3. True/False: If a method of a class is declared as const, attempting to modify a data member by this method results in compile time error.

    Answer: True

  4. True/False: If we declare a constant pointer as

      int const * ptr = &j ; the pointer cannot be reassigned.

    Answer: True

  5. True/False: We cannot invoke a function with different number of arguments at different times except function with default arguments.

    Answer: False

  6. A function with variable number of arguments
    1. has only one prototype declaration
    2. should have ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.