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

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Any #include files may contain

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. The best-written classes have

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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. 3 is a _____ constant

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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

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

    View Answer

    Workspace

    Discuss Discuss in Forum