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.
You might also like to view...
According to the BSIMM, what practice area is typically the least mature amongst the organizations analyzed?
A. Compliance and policy B. Attack models C. Training D. Code review
The first statement in every paintComponent method should be a call to ________.
a. super b. super.paintComponent c. clear d. update
On a Windows XP machine, memory is treated as a physical device. The internal address for memory in XP is _________.
a. //physicalmemory b. /dev/mem c. $PHYSMEM d. \\SYSTEM32\PhysicalMemory
The notification area can tell you ____.?
A. ?if your virus protection is out of date B. ?whether you are connected to a network C. ?how much battery life you have remaining in your laptop D. ?which operating system is running