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

CSE :: Object Oriented Programming Using C++

  1. The instruction "If it's raining outside, then take an umbrella to work" is an example of the _____ structure

  2. A.
    control
    B.
    repetition
    C.
    selection
    D.
    sequence
    E.
    switching

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following statements will assign the address of the age variable to the agePtr pointer?

  4. A.
    agePtr = &age;
    B.
    agePtr = *age;
    C.
    &agePtr = age;
    D.
    *agePtr = age;
    E.
    agePtr -> *age;

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. The >> (extraction) operator stops reading characters from the keyboard as soon as the user _____

  6. A.
    presses the Enter key
    B.
    types a character that is inappropriate for the variable's data type
    C.
    both (a) and (b)

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. In the statement template<class T>,

  8. A.
    T is a class
    B.
    T is a scalar variable
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. The null character is represented by

  10. A.
    \n
    B.
    \0
    C.
    \o
    D.
    \r
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. The break statement is

  12. A.
    a preprocessor directive
    B.
    an operator in the C++ language
    C.
    a keyword in the C++ language
    D.
    switch in the C++ language
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. A variable w with a value 67 may be defined with _______

  14. A.
    int w = 67;
    B.
    int w(67);
    C.
    int 67(w);
    D.
    both (a) and (b), but not (c).

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. An expression contains relational, assignment and arithmetic operators. In the absence of parentheses, the order of evaluation will be

  16. A.
    assignment, relational, arithmetic
    B.
    arithmetic, relational, assignment
    C.
    relational, arithmetic, assignment
    D.
    assignment, arithmetic, relational
    E.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. The keyword virtual indicates that

  18. A.
    a derived class has public access to a base class
    B.
    more than one base class exists
    C.
    a base class should be used only once in inheritance
    D.
    a derived class should have more than one base class constructed

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. If you declare two objects as Customer firstCust, secondCust; which of the following must be true?

  20. A.
    Each object will store a separate copy of any static member data
    B.
    Each object will store a separate copy of any member functions
    C.
    Each object will store a separate copy of any nonstatic data members
    D.
    You cannot declare two objects of the same class

    View Answer

    Workspace

    Discuss Discuss in Forum