Appendix J. Answers to the Review Questions
Answers to Review Questions for Chapter 2
1. They are called functions.
2. It causes the contents of the
iostream file to be substituted for this directive before final compilation.
3. It makes definitions made in the
std namespace available to a program.
cout << "Hello, world\n";
cout << "Hello, world" << endl;
cheeses = 32;
cin >> cheeses;
cout << "We have " << cheeses << " varieties of cheese\n";
9. The function
froop() expects to be called with one argument, which will be type
double, and that the function will return a type
int value. For instance, it could be used as follows:
int gval = froop(3.14159);
rattle() has no return value and expects an ...