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

CSE :: Object Oriented Programming Using C++

  1. Which of the following is a valid condition for an if statement? (The condition should be both syntactically and logically valid.)

  2. A.
    (age) > 65
    B.
    (age > 0 and < 10)
    C.
    (sales > 500 && < 800)
    D.
    (sales > 100 && sales <= 1000)
    E.
    (sales > 100 || sales <= 1000)

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. A pattern for creating an object is called a(n) _____

  4. A.
    class
    B.
    attributes
    C.
    private
    D.
    public

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. An asterisk placed after a data type means .

  6. A.
    array to
    B.
    pointer to
    C.
    address to
    D.
    located to

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. An object is a(n) _____ of a class

  8. A.
    owner
    B.
    function
    C.
    definition
    D.
    instance

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of the following statements creates and initializes a pointer named salesPtr?

  10. A.
    salesPtr = NULL;
    B.
    *salesPtr = "";
    C.
    float &salesPtr = NULL;
    D.
    float *salesPtr = "";
    E.
    float *salesPtr = NULL;

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. With communicational cohesion

  12. A.
    a tasks and the data are related
    B.
    the tasks are related; the data are not
    C.
    the data are related; the tasks are not
    D.
    the tasks and the data are unrelated

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. The function printDataMembers() is mot likely a(n) ________

  14. A.
    inspector functions
    B.
    mutator functions
    C.
    auxiliary functions
    D.
    manager functions

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. The data type listed at the beginning of a value-returning function's header indicates the type of data the function will _____

  16. A.
    return
    B.
    pass
    C.
    receive

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. The code class Descendant : virtual public Ancestor indicates that

  18. A.
    the members of Ancestor will be included more than once in Descendant
    B.
    the members of Ancestor will be included only once in Descendant
    C.
    the members of Descendant will be included more than once in Ancestor
    D.
    the members of Descendant will be included only once in Ancestor

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Inheritance is the principle that

  20. A.
    Classes with the same name must be derived from one another
    B.
    Knowledge of a general category can be applied to more specific objects
    C.
    C++ functions may be used only if they have logical predecessors
    D.
    One function name may invoke different methods

    View Answer

    Workspace

    Discuss Discuss in Forum