Appendix E. Answers

Answers for Lesson 1

Quiz

1. An interpreter is a tool that interprets what you code (or an intermediate byte code) and performs certain actions. A compiler is one that takes your code as an input and generates an object file. In the case of C++, after compiling and linking you have an executable that can run directly by the processor without need for any further interpretation.

2. A compiler takes a C++ code file as input and generates an object file in machine language. Often your code has dependencies on libraries and functions in other code files. Creating these links and generating an executable that integrates all dependencies directly and indirectly coded by you is the job of the linker.

3. Code. Compile to create ...

Get Sams Teach Yourself C++ in One Hour a Day, Eighth 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.