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

CSE :: Object Oriented Programming Using C++

  1. A constructor always has

  2. A.
    communicational cohesion
    B.
    temporal cohesion
    C.
    logical cohesion
    D.
    no cohesion

  3. A normal C++ operator that acts in special ways on newly defined data types is said to be

  4. A.
    glorified
    B.
    encapsulated
    C.
    classified
    D.
    overloaded

  5. A function in a derived class that has the same name as a function in the parent class

  6. A.
    will override the base class function
    B.
    will cause an error message to display
    C.
    will be overridden by the base class function
    D.
    will execute immediately often the base class function executes

  7. In which statements, does a 'continue' statements cause the control to go directly to the test condition and then continue the looping process?

  8. A.
    'for' and 'while'
    B.
    'while' and 'if-else'
    C.
    'do-while' and 'if-else'
    D.
    'while' and 'do-while'
    E.
    None of the above

  9. Which of the following statements is false?

  10. A.
    You typically use a public member function to change the value in a private data member
    B.
    Because the constructor function does not return a value, you place the keyword void before the constructor's name
    C.
    The public member functions in a class can be accessed by any program that uses an object created from that class
    D.
    An instance of a class is considered an object

  11. In a class specifier, data or functions designated private are accessible

  12. A.
    to any function in the program
    B.
    only if you know the password
    C.
    to member functions of that class
    D.
    only to public members of the class

  13. When a function includes a throw statement for errors, the call to the potentially offending function should be placed within a _____ block

  14. A.
    throw
    B.
    try
    C.
    catch
    D.
    scope

  15. The scope resolution operator is

  16. A.
    a comma
    B.
    a semicolon
    C.
    a colon
    D.
    two colons

  17. "C++" is a _____ constant

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

  19. In a C++ program, which of the following can be thrown?

  20. A.
    scalar variables
    B.
    programmer-defined objects
    C.
    both (a) and (b)
    D.
    neither (a) nor (b)