Home / CSE / Object Oriented Programming Using C++ :: Section 6

CSE :: Object Oriented Programming Using C++

  1. Which of the following are valid characters for a numeric literal constant?

  2. A.
    a decimal point
    B.
    the letter e
    C.
    a minus sign
    D.
    a plus sign
    E.
    All of the above

  3. Any #include files may contain

  4. A.
    constants
    B.
    variables
    C.
    functions
    D.
    All of the above

  5. When a break statement is used in a loop, the control skips the rest of the statements in the loop after it and jumps

  6. A.
    to the last lines in the program
    B.
    to the next statement written after the body of the loop
    C.
    to the first statement in the body of the loop
    D.
    All. of the above
    E.
    None of the above

  7. The function that takes arguments to set the bits of count is _____

  8. A.
    setf()
    B.
    bitsef()
    C.
    ios()
    D.
    flag()

  9. When two types are used in a function template and one is labeled T, the other

  10. A.
    must also be named T
    B.
    must be named U
    C.
    can be any legal C++ identfier
    D.
    it is illegal to have two types

  11. The best-written classes have

  12. A.
    all functions private
    B.
    all data public
    C.
    no functions
    D.
    None of the above

  13. Making class members inaccessible to nonmember functions is an example of

  14. A.
    polymorphism
    B.
    data hiding
    C.
    redundancy
    D.
    recursion

  15. Providing two or more constructors for the same class _____

  16. A.
    requires different argument lists
    B.
    requires different constructor names
    C.
    requires different constructor types
    D.
    is illegal

  17. 3 is a _____ constant

  18. A.
    character literal
    B.
    named literal
    C.
    numeric literal
    D.
    string literal

  19. _____ variables remain in memory until the statement block ends

  20. A.
    Area
    B.
    Global
    C.
    Local
    D.
    Reference
    E.
    Value