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

CSE :: Object Oriented Programming Using C++

  1. An address is a _____ , while a pointer is a _____

  2. A.
    array, variable
    B.
    constant, variable
    C.
    variable, position
    D.
    variable, location

  3. Procedural cohesion is similar to sequential cohesion, except that with procedural cohesion _____

  4. A.
    the tasks are not done in order
    B.
    the tasks are simpler
    C.
    the tasks share data
    D.
    the tasks do not share data

  5. Which of the following creates an animal object named dog?

  6. A.
    animal "dog";
    B.
    animal dog;
    C.
    dog "animal";
    D.
    dog animal;

  7. The getline() function reads a line of text until _____

  8. A.
    the length used as the second argument is reached
    B.
    the character used as the third argument is reached
    C.
    either (a) or (b)
    D.
    neither (a) nor (b)

  9. The extraction operator >> is a(n)

  10. A.
    overloaded function
    B.
    C++ class
    C.
    C++ object
    D.
    static reference variable

  11. One drawback to returning an error code from a function is _____

  12. A.
    functions cannot return error codes
    B.
    error codes must be integers, and some functions can't return an integer
    C.
    a function can return only one value, so it can return only the error code
    D.
    a function that returns an error code will identify all returns as errors

  13. Assuming the following three operators appear in an expression (without parentheses), which of the operators will be performed first?

  14. A.
    &&
    B.
    !
    C.
    ||

  15. The code that you enter into a C++ program is called _____

  16. A.
    console code
    B.
    object code
    C.
    project code
    D.
    source code

  17. If a base class member is private, then

  18. A.
    if a derived class uses the public access specifier, the data member becomes public
    B.
    if a derived class uses the protected access specifier, the data member becomes protected
    C.
    both (a) and (b)
    D.
    neither (a) nor (b)

  19. Which of the following instructions tells C++ to merge the source code from the iostream.h file into the current file?

  20. A.
    #include <iostream.h>
    B.
    #include iostream.h
    C.
    #include <iostream.h>
    D.
    #merge iostream.h
    E.
    None of the above