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

CSE :: Object Oriented Programming Using C++

  1. If you want to override constructor default values for an object you are instantiating, you must also override

  2. A.
    all other parameters to that constructor
    B.
    all parameters to the left of that value
    C.
    all parameters to the right of that value
    D.
    no other parameters to that constructor

  3. An unsigned double type of data

  4. A.
    can have only positive values
    B.
    does not exist
    C.
    is always less than 1010
    D.
    can have only negative values
    E.
    None of the above

  5. The extraction operator >> is a(n) _____

  6. A.
    overloaded function
    B.
    C++ class
    C.
    C++ object
    D.
    static reference variables

  7. Modules in C++ programs are

  8. A.
    functions
    B.
    procedures
    C.
    subroutines
    D.
    miniprograms

  9. The return type for all destructors is

  10. A.
    the class
    B.
    void
    C.
    the same as the first data in the class
    D.
    None

  11. If an exception is thrown and no catch block matches the type of the thrown parameter, then _____

  12. A.
    the program terminates
    B.
    the first catch block is executed
    C.
    the last catch block is executed
    D.
    the program proceeds with the code following the catch blocks

  13. The comma operator (,) is used to

  14. A.
    permit two different expressions to appear in situations where only one expression would ordinarily be used
    B.
    terminate loops or to exit from switch
    C.
    alter the normal sequence of program execution by transferring control to some other part of the program
    D.
    carry out a logical test and then take one of two possible actions, depending upon the outcome of the test
    E.
    None of the above

  15. A function that is called automatically each time an object is created is a(n)

  16. A.
    constructor
    B.
    contractor
    C.
    builder
    D.
    architect

  17. Which of the following statements creates a named constant called driverAge whose value is 16?

  18. A.
    const driverAge = 16;
    B.
    const short driverAge = 16;
    C.
    driverAge =16;
    D.
    driverAge const =16;
    E.
    namedconst driverAge =16;

  19. Which functions do not have a this pointer?

  20. A.
    access functions
    B.
    inspector functions
    C.
    member functions
    D.
    static functions