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

CSE :: Object Oriented Programming Using C++

  1. _____ variables are declared outside of any statement block

  2. A.
    Area
    B.
    Global
    C.
    Local
    D.
    Reference
    E.
    Value

  3. The end of string is recognized by

  4. A.
    the null character
    B.
    the newline character
    C.
    the $ sign
    D.
    the / sign
    E.
    None of the above

  5. Variable names known only to the procedure in which they are declared are ________

  6. A.
    local
    B.
    global
    C.
    recent
    D.
    internal

  7. Whis is true?

  8. A.
    A derived class may have more than one base class
    B.
    A base class may have more than one derived class
    C.
    both (a) and (b)
    D.
    neither (a) nor (b)

  9. The keyword used to define a structure is

  10. A.
    stru
    B.
    stt
    C.
    struct
    D.
    unlimited

  11. If you omit any constructor argument when you instantiate an object, you must use default values

  12. A.
    for all parameters to the constructor
    B.
    for all parameters to the right of the argument
    C.
    for all parameters to the left of the argument
    D.
    for no other parameters

  13. The C++ expression p --> val means the same thing as

  14. A.
    *p.val
    B.
    *(p.val)
    C.
    (*p).vai
    D.
    p.val

  15. Which of the following tells C++ to display numbers with zero decimal places?

  16. A.
    setiosflags(0)
    B.
    setiosflags(zero)
    C.
    setprecision(0)
    D.
    setprecision(zero)

  17. Code that has already been tested is said to be _____

  18. A.
    inherited
    B.
    reusable
    C.
    reliable
    D.
    polymorphic