(a) The data will be properly read.
(b) The data cannot be properly read, but the state of istream
is still correct. After reading 10
as bookNo
, an unsigned number is wanted, thus 24
will be read into units_sold
, then a double is wanted, thus 0.95
will be read into revenue
.