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:
Verified
Q41: The get function reads
A) one integer value
B)
Q42: In order to use the stream manipulators,
Q43: The command outFile.width10) is used to
A) change
Q44: What character will be in variable c
Q45: What is wrong with the following code?
While
Q47: Which of the following loop condition statements
Q48: What is the output of the following
Q49: The put function outputs
A) one character value
B)
Q50: If the user types in the characters
Q51: ios::showpos is a flag that
A) always displays
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