Consider the following program segment. 
ifstream inFile; //Line 1int 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");


Answer: A

Computer Science & Information Technology

You might also like to view...

When you call a ____________ method, it executes statements it contains and then returns a value back to the program statement that called it.

a. recursive b. void c. value-returning d. public

Computer Science & Information Technology

A subclass can directly access __________.

a. only protected and private members of the superclass b. all members of the superclass c. only public and private members of the superclass d. only public and protected members of the superclass

Computer Science & Information Technology

The port number at which the server waits for connections is often called the __________ point.

a. handhold. b. handshake. c. handoff. d. handle.

Computer Science & Information Technology

A macro can create and send a report via e-mail by exporting the report to ________

A) Microsoft Outlook B) Yahoo!Mail C) Gmail D) any e-mail server

Computer Science & Information Technology