MULTIPLE CHOICE QUESTIONS AND ANSWERS
  1. In the Standard C++ the new class string is defined in
    • header file <string.h>
    • namespace std
    • namespace string
    • namespace standard
    • none of the above

    Answer: (b)

  2. True/False: When you compare strings of new class string with relational operators result is of type boolean.

    Answer: False

  3. True/False: You cannot concatenate strings of new class string with plus (+) operator.

    Answer: False

  4. There is no direct mechanism to locate a sub-string in a string.

    Answer: False

  5. True/False: Prefix or postfix operator –– can be applied to variables of type bool.s

    Answer: False

  6. True/False: If variable flag is of type bool, flag++ will set it to true.

    Answer: True

  7. Elements of class List can be accessed _________.
    • only sequentially ...

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.