Solved

We Have a File That Has a Name in It

Question 46

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents