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

CSE :: Object Oriented Programming Using C++

  1. The statement double val[15]={44.123456};

  2. A.
    assigns the value 44.123456 to all members of the array val
    B.
    assigns the value 44.123456 to val[0] and 0 to the rest of the members
    C.
    gives an error message
    D.
    assigns the value 44.12345 to val[1] and val[5]

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following C++ expressions will find the square root of the number 16?

  4. A.
    pow (16, 2) (b) root (16, 2)
    B.
    sqroot (16)
    C.
    sqrt (16, 2)
    D.
    sqrt (16)

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. It is illegal to make objects of one class members of another class

  6. A.
    True
    B.
    False
    C.
    depends upon the kind of object

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Catch blocks must _____

  8. A.
    appear in every object-oriented program
    B.
    appear within try blocks
    C.
    appear immediately after throw statements
    D.
    appear immediately after try blocks

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. An exception specification begins with the keyword _____

  10. A.
    exception
    B.
    try
    C.
    throw
    D.
    catch

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. You construct a class in two sections, known as the _____

  12. A.
    header and body
    B.
    type and parameters
    C.
    declaration and implementation
    D.
    pointer and variable

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. It is sometimes useful to specify a class from which no objects will ever be created

  14. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. The statement i*=3 is equivalent to

  16. A.
    i = 3*
    B.
    i = 3
    C.
    i* = 3
    D.
    i = i * 3
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. The complement operator is represented by the symbol

  18. A.
    ~
    B.
    ^
    C.
    i
    D.
    <
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. One of the relational operators in the C language is

  20. A.
    !=
    B.
    &&
    C.
    !
    D.
    #
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum