Answer to Question #146568 in C++ for usama saleem

Question #146568
For each line of code given below, what would be displayed on the screen:
1) cout << 1 / 2 << " " << 1 / (double) 2 << ' ' << 1 / 2 * 1.0 << ' ' << 1.0 * 1 / 2;
2) cout << (char) 65.5;
3) cout << (char) 65 + 1;
4) cout << (char) 65 + (char) 1;
5) cout << 'A' + 'B';
6) cout << (char) (65 + 1);
1
Expert's answer
2020-11-25T13:10:49-0500
1) 0 0.5 0 0.5
2) A
3) 66
4) 66
5) 131
6) B

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog