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

CSE :: Object Oriented Programming Using C++

  1. The statement double total = 0.0; performs _____

  2. A.
    assignment
    B.
    initialization
    C.
    rationalization
    D.
    polymorphism

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. The two parts of a function are the

  4. A.
    header and footer
    B.
    declarations and statements
    C.
    legs and feet
    D.
    header and body

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. The general principle underlying object-oriented error handling is that a called function should __________

  6. A.
    neither check for, nor handle errors
    B.
    check for errors but not be required to handle any detected
    C.
    handle errors, but not check for them
    D.
    both check for and handle errors

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the following is false?

  8. A.
    A void function's header begins with the keyword void
    B.
    A value-returning function's header begins with a data type, which represents the type of data the function will return
    C.
    Assuming displayAge is the name of a void function, displayAge(); is a both logically and syntactically valid C++ statement
    D.
    Assuming calcNewPrice is the name of a value-returning function, calcNewPriceO; is a both logically and syntactically valid C++ statement
    E.
    Both void and value-returning functions can receive arguments.

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Reference variables and const class member

  10. A.
    must be assigned values in any derived class
    B.
    must never be initialized in a base class
    C.
    must be initialized, rather than assigned values
    D.
    must not exit if a class is to be a base class

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. The actual arguments cannot he

  12. A.
    a constant or a variable
    B.
    of a different type from the corresponding formal arguments
    C.
    other functions
    D.
    expressions
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which is true?

  14. A.
    Coincidental cohesion is stronger than procedural cohesion
    B.
    Logical cohesion is stronger than coincidental cohesion
    C.
    Sequential cohesion is weaker than temporal cohesion
    D.
    The weakest cohesion is functional

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. A predefined function that may be used to handle memory allocation errors is

  16. A.
    handle_error
    B.
    set_new_handler
    C.
    new_fix
    D.
    memory_error

    View Answer

    Workspace

    Discuss Discuss in Forum


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

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. The _____ function returns the uppercase equivalent of a character

  20. A.
    caseupper
    B.
    charupper
    C.
    toupper
    D.
    uCase
    E.
    upper

    View Answer

    Workspace

    Discuss Discuss in Forum