0
ifstream inputFile("blah.txt");
char c;
inputFile.read((char *)(&c), 1);

Let's say at the read, the file has already reached the EOF.
What value ends up in c?

Choice
  • 85
  • 5

1 Answers1

2

Characters are extracted and stored until any of the following conditions occurs: ... end of file condition occurs on the input sequence ...

Read more at: http://en.cppreference.com/w/cpp/io/basic_istream/read

So your char will contain the same value as before.

ly000
  • 343
  • 4
  • 12