Computer Science - Object Oriented Programming Using C++

46. 

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

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

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

47. 

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

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

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

48. 

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

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

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

49. 

A class named Student must have a constructor whose name is

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

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

50. 

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

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

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

« Prev   1 2 3 4 5 6 7 8 9 10