We have a file that has a name in it, but the name is written one character per line. We need to write this name to the screen. What is wrong with the following code?

ifstream fileIn;
fileIn.open("file.txt");
char ch;
fileIn.get(ch)
while(!fileIn.eof())
{
cout.put(ch);
fileIn.get(ch);
}

a. can not use put with cout.
b. our output has new lines in it.
c. nothing is wrong
d. eof is not a member of an ifstream object

b. our output has new lines in it.

Computer Science & Information Technology

You might also like to view...

Excel's Power View report includes a map ________ that can be used with filters or slicers, or even used to filter other charts in the report

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

DES exhibits the classic __________ block cipher structure, which consists of a number of identical rounds of processing.

A) ?Feistel B) ?SAC ? C) ?Shannon ? D) ?Rendell

Computer Science & Information Technology