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

  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

  5. Static variables are sometimes called

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

  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

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

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

  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");

  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";

  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)

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

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

  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()