Chapter 2 Review

1: What is the purpose of the "Hello, World" program?
To serve as the bare minimum example of applied programming for any given language. It covers the funadments of syntax, comments, functions, statements, and declarations.

2: Name the four parts of a function.
Name, parameter list (synonymous with arguments?), return type (can be shortened to type??), function body (synonymous with block statement???).

3: Name a function that musut appear in every C++ program.
main()

4: In the "Hello, World!" program, what is the purpose of the line return 0;?
To indicate to the system that the program has terminated succesfully, as is tradition.

5: What is the purpose of the compiler?
To translate source code into machine code, and to alert users to any compile-time errors.

6: What is the purpose of the #include directive?
To allow functions and statements from the included files to be utilized.

7: What does a .h suffix at the end of a file name signify in C++?
Header file, containing definitions of terms to be used in linked programs.

8: What does the linker do for your program?
Links different project files together, like those included in the #include directive.

9: What is the difference between a source file and an object file?
Source files contain human readable code and comments. Object files contain only binary code.

10: What is an IDE and what does it do for you?
An IDE (integrated development enviornment) is a front end suite comprised of all the tools needed for writing, editing, compiling, running, and debugging code. All of these utilities are accessible via a single interface, which many find easier to use than the alternative command line workflow.

11: If you understand everything in the textbook, why is necessary to practice?
Because programming is just as much of a craft as it is an understanding of computing theory. Performing on the job will require practitioners of these arts to write code quickly and reliably, which necessitates a lifetime of applied practice and refinement.

Edit
Pub: 17 May 2023 01:10 UTC
Views: 391