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

CSE :: Object Oriented Programming Using C++

  1. When a program calls a function that has default parameters, if you omit an argument, you must _____

  2. A.
    not omit any other arguments
    B.
    omit all arguments
    C.
    omit all arguments to the right of that argument
    D.
    omit all arguments to the left of that argument

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Each generic type in a template function definition is preceded by the keyword _________

  4. A.
    template
    B.
    function
    C.
    type
    D.
    class

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. The declaration section holds

  6. A.
    data members
    B.
    data members and function prototypes
    C.
    data members, function prototypes, and the functions themselves
    D.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. A derived class _____ override attributes of a parent class

  8. A.
    may
    B.
    may if the two classes have the same name
    C.
    must
    D.
    must not

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. In object-oriented terms, an exception may be considered a(n) _____

  10. A.
    child
    B.
    encapsulation
    C.
    message
    D.
    scalar type

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. A(n) _____ is a numeric variable used for counting something

  12. A.
    accumulator
    B.
    adder
    C.
    constant
    D.
    counter
    E.
    integer

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. The element of an array is

  14. A.
    the name of the array
    B.
    a member of an array
    C.
    a value assigned to an array
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. When the function void someFunction(int x) throw(char) is executed,_____

  16. A.
    it will throw nothing
    B.
    it may throw an integer
    C.
    it may throw a character
    D.
    it may not throw anything

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of the following is NOT included in the header of a function?

  18. A.
    the type of variable returned by the function to the function that calls it
    B.
    the name of the program or function that calls the function
    C.
    the name of the function
    D.
    the types and names of any variables that will be passed to the function

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. If you want only one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare the variable as________

  20. A.
    dynamic
    B.
    unary
    C.
    static
    D.
    volatile

    View Answer

    Workspace

    Discuss Discuss in Forum