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

CSE :: Object Oriented Programming Using C++

  1. A static data member is given a value

  2. A.
    within the class definition
    B.
    outside the class definition
    C.
    when the program is executed
    D.
    never

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. _____ refers to the process of locating and removing the errors in a program

  4. A.
    Analyzing
    B.
    Correcting
    C.
    Debugging
    D.
    Executing
    E.
    Tracking

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Static variables are sometimes called

  6. A.
    class variables
    B.
    functional variables
    C.
    dynamic variables
    D.
    auto variables

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. You can pass _____ to functions

  8. A.
    copies of individual structure members
    B.
    copies of entire structures
    C.
    pointers to structures
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Element doubleArray[7] is which element of the array?

  10. A.
    the sixth
    B.
    the seventh
    C.
    the eighth
    D.
    impossible to tell

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of the following statements opens a file named temp.dat for output?

  12. A.
    outFile.open("temp .dat");
    B.
    fileOut.output("temp .dat");
    C.
    openFile.out("temp .dat");
    D.
    fileOpen.out("temp .dat");
    E.
    out.fileOpen("temp .dat");

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of the following will store the letter H in a Character variable named initial?

  14. A.
    initial = 'H'
    B.
    initial = 'H';
    C.
    initial = "H"
    D.
    initial = "H";

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Compared with the classes from which they are derived, inherited classes may have _____

  16. A.
    additional data members
    B.
    additional member functions
    C.
    both (a) and (b)
    D.
    neither (a) nor (b)

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. A class named Student must have a constructor whose name is

  18. A.
    Student
    B.
    ~Student
    C.
    constructor
    D.
    any legal C++ name

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. To write data that contains variables of type float, to an object of type ofstream, you should use

  20. A.
    the insertion operator
    B.
    seekg()
    C.
    writeQ
    D.
    put()

    View Answer

    Workspace

    Discuss Discuss in Forum