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

  3. A pointer to void can hold pointers to

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

  5. Which of the following is the extraction operator?

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

  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

  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

  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

  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

  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

  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

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

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