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

CSE :: Object Oriented Programming Using C++

  1. A function's purpose is to print customer data. Which of the following is the best name for this function?

  2. A.
    pcd(). It's short for "print customer data" and takes few keystrokes
    B.
    Printcustomerdata(). It states everything the function will do
    C.
    printCustomer(). It states the function's purpose and is easy to read
    D.
    lastFunction(). It is the final function called in most programs, and this name identifies the function's timing

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. A pointer to void can hold pointers to

  4. A.
    char type
    B.
    int type
    C.
    float type
    D.
    any data type

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of the following is the extraction operator?

  6. A.
    >>
    B.
    <<
    C.
    //
    D.
    /*
    E.
    both (a) and (b)

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. The function whose prototype is void getData(Item &thing); receives

  8. A.
    a pointer to a structure
    B.
    a reference to a structure
    C.
    a copy of a structure
    D.
    nothing

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. When a multidimensional array is accessed, each array index is

  10. A.
    separated by commas
    B.
    surrounded by brackets and separated by commas
    C.
    separated by commas and surrounded by brackets
    D.
    surrounded by brackets

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. To create a variable, you must assign _____ to it

  12. A.
    a data type
    B.
    a name
    C.
    both a data type and a name
    D.
    the word var

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. You indicate a variable is a pointer variable by placing a(n) _____ in front of the variable's name

  14. A.
    asterisk
    B.
    ampersand
    C.
    dollar sign
    D.
    exclamation point

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. A function can make_________

  16. A.
    one throw
    B.
    one throw of each scalar type
    C.
    one throw of each programmer-defined type
    D.
    as many throws of as many types as necessary

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. A default exception block must be placed _____

  18. A.
    first among the catch blocks
    B.
    last among the catch blocks
    C.
    globally, at the top of the file
    D.
    at the end of all code in the program

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of the following control structures is used in every program?

  20. A.
    repetition
    B.
    selection
    C.
    sequence
    D.
    switching

    View Answer

    Workspace

    Discuss Discuss in Forum