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

CSE :: Object Oriented Programming Using C++

  1. The main difference in operation between an 'if statement and a 'while' statement is

  2. A.
    the 'while' loop body is executed
    B.
    the body of the 'while' statement may be executed many times, the body of the 'if statements only once
    C.
    the conditional expression following the keyboard is evaluated differently
    D.
    All of the above
    E.
    None of the above

  3. If a class object is thrown with a throw statement, then a subsequent catch block has a usable match if the type of the catch argument is_________

  4. A.
    a parent class of the thrown class
    B.
    a child class of the thrown class
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

  5. The weakest form of cohesion is

  6. A.
    coincidental
    B.
    functional
    C.
    logical
    D.
    communicational

  7. The 'continue' statement is used to

  8. A.
    permit two different expressions to appear in situations where only one expression would ordinarily be used
    B.
    terminate loops or to exit from a switch
    C.
    alter the normal sequence of program execution by transferring control to some other part of the program
    D.
    All of the above
    E.
    None of the above

  9. The 'break' statement is used to exist from

  10. A.
    a do loop
    B.
    a for loop
    C.
    a switch statement
    D.
    All of the above
    E.
    None of the above

  11. You have assigned the address of Value to the pointer P, Which statement will display the value stored in Value?

  12. A.
    cout<<P;
    B.
    cout<<*Value;
    C.
    cout<<&P;
    D.
    cout<<*P;

  13. A constructor initialization list is preceded by

  14. A.
    a. semicolon
    B.
    a colon
    C.
    two colons
    D.
    a space

  15. In C++, a function contained within a class is called

  16. A.
    a member function
    B.
    an operator
    C.
    a class function
    D.
    a method

  17. Which of the following statements will create and initialize a feelnfo array named fee?

  18. A.
    fee feeInfo = {{0}, {0}};
    B.
    fee as feeInfo = 0, 0;
    C.
    feeInfo fee = 0, 0;
    D.
    feeInfo fee = [{0}, {0}];
    E.
    feeInfo fee = {0,0};

  19. Which of the following is the scope resolution operator?

  20. A.
    ->>
    B.
    ::
    C.
    *
    D.
    &