Solved

We Have a File That Has a Name in It

Question 41

Multiple Choice

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.getch)
While!fileIn.eof) )
{
Cout.putch) ;
FileIn.getch) ;
}


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

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions