Answers for Day 21
Quiz
1.Modular programmingrefers to the program development method that breaks a
program into multiple source-code files.
- The main module contains the main()function.
- To avoid unwanted side effects by ensuring that complex expressions passed as
arguments to the macro are fully evaluated first. - Compared to a function, a macro results in faster program execution but larger pro-
gram size. - The defined()operator tests to see whether a particular name is defined, returning
TRUEif the name is defined and FALSEif it isn’t. - You must use #endif.
- Compiled source files become object files with an .OBJ extension.
8.#includecopies the contents of another file into the current file. - An #includestatement with double quotes looks in the current directory for the
include file. An includestatement with <>searches the standard directory for the
include file. - DATE is used to place into the program the date that the program was com-
piled.
A string containing the name of the current program, including path information.
Answers for Bonus Day 1
Quiz
- An OOP language is characterized by
Polymorphism
Encapsulation
Inheritance
Reuse - Polymorphism
- None. All of the C commands can be used in a C++ program.
874 Appendix F
49 448201x-APP F 8/13/02 11:22 AM Page 874