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

CSE :: Object Oriented Programming Using C++

  1. Evaluate the following expression: 7 >=3 + 4 || 6<4 && 2<5

  2. A.
    True
    B.
    False

  3. The base class for most stream classes is the _____ class

  4. A.
    ios
    B.
    out
    C.
    in
    D.
    app

  5. Which of the following while clause will stop the loop when the value in the age variable is less than the number 0?

  6. A.
    while age < 0
    B.
    while (age < 0)
    C.
    while age >= 0;
    D.
    while (age >= 0);
    E.
    while (age >= 0)

  7. The most efficient data type for a variable that stores the number 4.6e20 is the _____ data type

  8. A.
    Character
    B.
    Double
    C.
    Float
    D.
    Long Integer
    E.
    Short Integer

  9. Which of the following is a C++ object?

  10. A.
    cin
    B.
    >>
    C.
    iostream
    D.
    read()

  11. Which of the following can be used to declare the main function?

  12. A.
    void main
    B.
    void Main()
    C.
    void main()
    D.
    main
    E.
    either (b) or (c) can be used

  13. You _____ write your own container classes

  14. A.
    must
    B.
    may
    C.
    should not
    D.
    must not

  15. If an integer object is thrown with a throw statement, then a subsequent catch block has a usable match if the type of the catch argument is

  16. A.
    int
    B.
    double
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

  17. The highest level of cohesion is

  18. A.
    functional cohesion
    B.
    temporal cohesion
    C.
    logical cohesion
    D.
    sequential cohesion

  19. You separate a derived class name from its access specifier with

  20. A.
    a colon
    B.
    two colons
    C.
    at least one space
    D.
    a semicolon