Chapter 2

A1: They are called functions.
A2: It causes the contents of the iostream file to be substituted for this directive before final compilation.
A3: It makes definitions made in the std namespace available to a program.
A4: cout << "Hello, world\n";
A5: int cheeses;
A6: cheeses = 32;
A7: cin >> cheeses;
A8: cout << "We have " << cheeses << " varieties of cheese\n";
A9: It tells us that 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.
A10: You don't use return in a function when the function has return type void.

Get The Waite Group's C++ Primer Plus, Third 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.