Review Questions

You find the answers to these and subsequent review questions in Appendix J, “Answers to Review Questions.”

1:What are the modules of C++ programs called?
2:What does the following preprocessor directive do?
#include <iostream>
3:What does the following statement do?
using namespace std;
4:What statement would you use to print the phrase “Hello, world” and then start a new line?
5:What statement would you use to create an integer variable with the name cheeses?
6:What statement would you use to assign the value 32 to the variable cheeses?
7:What statement would you use to read a value from keyboard input into the variable cheeses?
8:What statement would you use to print “We have X varieties of cheese,” where the current value ...

Get C++ Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.