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

CSE :: Object Oriented Programming Using C++

  1. When you instantiate a derived class object, a constructor for the derived class _____

  2. A.
    is not called
    B.
    is called prior to the base class constructor
    C.
    is called simultaneously with the base class constructor
    D.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. A constructor may be _____

  4. A.
    provided automatically by C++
    B.
    written by you
    C.
    either (a) or (b).
    D.
    neither (a) nor (b).

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Software that can be used in applications other than the one for which it was originally written is called

  6. A.
    recyclable
    B.
    inherited
    C.
    reusable
    D.
    cheating

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the following statements is false?

  8. A.
    A class encapsulates all of an object's attributes and behaviors
    B.
    An example of an attribute is the minutes variable in a time class
    C.
    An example of a behavior is the setTime function in a time class
    D.
    A class is considered an object
    E.
    An object created from a class is referred to as an instance of the class

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Typing the function's name as Main, rather than main, is an example of

  10. A.
    an entry error
    B.
    a function error
    C.
    a logic error
    D.
    a syntax error

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. When the compiler cannot differentiate between two overloaded constructors, they are called______

  12. A.
    overloaded
    B.
    destructed
    C.
    ambiguous
    D.
    dubious

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. A function argument is

  14. A.
    a variable in the function that receives a value from the calling program
    B.
    a way that functions resist accepting the calling program's values
    C.
    a value sent to the function by the calling program
    D.
    a value returned by the function to the calling program
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. A function that is prototyped as double calculate(int num); may______

  16. A.
    receive an integer constant such as 5
    B.
    receive an integer variable
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Passing a variable pointer as a constant _____

  18. A.
    protects the contents pointed to by the pointer from change
    B.
    eliminates the need to name the pointer in the function
    C.
    eliminates the need to give the pointer a type in the function
    D.
    causes a copy of the pointer to be produced in the function

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Recursive Functions

  20. A.
    easier to code
    B.
    executable faster than iterative ones
    C.
    takes less main storage space
    D.
    necessary to solve a certain class of problems
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum