Mar 1, 2012 at 10:11pm UTC
Consider the statements below.
int A, B;
char C, D;
cin >> C >> A;
Before the read, the input buffer contains: A73-14
After the read, the buffer contains ___________ .
I answered A73 but it says that is wrong
Mar 1, 2012 at 10:15pm UTC
First cin >> C was executed. So 'A' was read. Then cin >> A was executed. So 73 was read. As a result the buffer now contains -14
Mar 2, 2012 at 12:39am UTC
okay i get it now thanks.
any clue on this one?
Consider the code segment:
int A; string B; float C;
cin >> C >> A >> B;
If the user types: 12.345 44RB79
The value of B = _______
Mar 2, 2012 at 1:12am UTC
nobody has a clue? because i always thought int and string didnt read decimals and float could
so float would read 12.345 but then it gets to int which would land on a blank space that it could not read