Consider the following program segment. ifstream inFile; //Line 1
Int x, y; //Line 2
) .. //Line 3
InFile >> x >> y; //Line 4
Which of the following statements at Line 3 can be used to open the file progdata.dat and input data from this file into x and y at Line 4?
A) inFile.open("progdata.dat") ;
B) inFile(open,"progdata.dat") ;
C) open.inFile("progdata.dat") ;
D) open(inFile,"progdata.dat") ;
Correct Answer:
Verified
Q23: Suppose that x = 55.68,y = 476.859,and
Q24: Suppose that ch1 and ch2 are char
Q28: Suppose that x = 25.67,y = 356.876,and
Q29: C++ comes with a wealth of functions,
Q30: What is the output of the following
Q31: The stream function _ lets you put
Q32: Manipulators without parameters are part of the
Q34: Suppose that alpha,beta,and gamma are int variables
Q35: When you want to process only partial
Q39: Suppose that x = 1565.683,y = 85.78,and
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents