Appendix G. Answers to Questions and Exercises

Chapter 1

Answers to Questions

1. procedural, object-oriented

2. b

3. data, act on that data

4. a

5. data hiding

6. a, d

7. objects

8. false; the organizational principles are different

9. encapsulation

10. d

11. false; most lines of code are the same in C and C++

12. polymorphism

13. d

14. b

15. b, d

Chapter 2

Answers to Questions

1. b, c

2. parentheses

3. braces { }

4. It’s the first function executed when the program ...

Get Object-Oriented Programming in C++, 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.