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

CSE :: Object Oriented Programming Using C++

  1. Variables that are declared in a block are known as _____ variables to that block

  2. A.
    confined
    B.
    local
    C.
    global
    D.
    immediate

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. The pow and sqrt functions return a(n) _____ type number

  4. A.
    double
    B.
    float
    C.
    integer
    D.
    long
    E.
    short

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Declaring variables is advantageous because it

  6. A.
    avoids errors from misspelled variable names {b) helps the linker work efficiently
    B.
    simplifies the writing of very short programs
    C.
    All of the above
    D.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. The generic name used for unexpected errors that occur during the execution of a program is

  8. A.
    infractions
    B.
    exceptions
    C.
    deviations
    D.
    anomalies

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. You add the desired type to a specific template class instantiation by placing the type's name ______

  10. A.
    between angle brackets
    B.
    in parentheses
    C.
    on a line by itself
    D.
    immediately prior to the class name

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. The switch variable can be of

  12. A.
    int type only
    B.
    char type only
    C.
    both int as well as char type
    D.
    float type only
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Reference variables and const class members _____

  14. 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 exist if a class is to be a base class

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. You can code a default exception handler by creating a catch block

  16. A.
    with no arguments
    B.
    with a void argument
    C.
    with an ellipsis as its argument
    D.
    with an argument identical to that thrown

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of the following are void functions?

  18. A.
    main
    B.
    pow
    C.
    sqrt
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Hiding individual components of an entry is _____

  20. A.
    polymorphism
    B.
    encapsulation
    C.
    scaling
    D.
    not recommended in C++

    View Answer

    Workspace

    Discuss Discuss in Forum