Chapter 8
A1: | Short, non-recursive functions that can fit in one line of code. |
A2: |
|
A3: | You can use either the string "\"" or the character `"` to print a quotation mark. The following functions show both methods:#include <iostream.h> void iquote(int n) { cout << "\"" << n << "\""; } void iquote(double x) { cout << `"` << x << `"`; } void iquote(const char * str) { cout << "\"" << str << "\""; } |
A4: |
|
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.