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

CSE :: Object Oriented Programming Using C++

  1. You have declared an integer pointer called point You have also declared an integer called number. Which statement is the correct format?

  2. A.
    point = number;
    B.
    point = *number;
    C.
    point = &number;
    D.
    point = +number;

  3. If you wanted to sort many large objects or structures, it would be most efficient to

  4. A.
    place them in an array and sort the array
    B.
    place pointers to them in an array and sort the array
    C.
    place them in a linked list and sort the linked list
    D.
    place references to them in an array and sort the array

  5. A function that is prototyped as double calculate(int num); may ______

  6. A.
    receive a double constant such as 3.9
    B.
    receive a double variable
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

  7. The printer can be accessed using the predefined filename _____

  8. A.
    printer file
    B.
    print
    C.
    cout
    D.
    PRN, LPT1, etc

  9. The best functions have _____

  10. A.
    high cohesion and tight coupling
    B.
    high cohesion and loose coupling
    C.
    low cohesion and tight coupling
    D.
    low cohesion and loose coupling

  11. One of the valid escape sequences used in the C language is

  12. A.
    \z
    B.
    \N
    C.
    \t
    D.
    \s
    E.
    None of the above

  13. A default constructor

  14. A.
    takes no arguments
    B.
    has default values for all its arguments
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

  15. Which of the following will increase the value stored in the first element of the fee array by 2?

  16. A.
    amount[0] = amount[0] + 2;
    B.
    amount, fee[0] = amount, fee [0] + 2;
    C.
    feelnfo.amount[0] = feelnfo.amount[0] + 2;
    D.
    fee[0].amount = fee[0].amount + 2;
    E.
    fee.amount[0] = fee.amount[0] + 2;

  17. Which loop always processes its instructions at least once?

  18. A.
    do-while
    B.
    for
    C.
    while

  19. When a new class is derived from an existing class, the derived class member functions _____ have names that differ from base class function names

  20. A.
    may
    B.
    may if the two classes have the same name
    C.
    must
    D.
    must not