diff --git a/education/software development/ECE1400/Chapter 15 Exercises.md b/education/software development/ECE1400/Chapter 15 Exercises.md index ef5a070..cbd6ac6 100644 --- a/education/software development/ECE1400/Chapter 15 Exercises.md +++ b/education/software development/ECE1400/Chapter 15 Exercises.md @@ -35,4 +35,8 @@ Output if DEBUG is not defined: > (c). Explain why the output is different in parts (a) and (b) -When `DEBUG` is defined, any instances of the `PRINT_DEBUG` token are replaced with a `printf` call during compile time, but when it's not defined, they're replaced with nothing. \ No newline at end of file +When `DEBUG` is defined, any instances of the `PRINT_DEBUG` token are replaced with a `printf` call during compile time, but when it's not defined, they're replaced with nothing. + +> (d). Is it necessary for the `DEBUG` macro to be defined *before* `debug.h` is included in order for `PRINT_DEBUG` to have the desired effect? Justify your answer. + +Macro invocations are evaluated sequentially, and so if `DEBUG` was defined after `PRINT_DEBUG`, then any usages of `PRINT_EVALUATION` would be have like `DEBUG` was not defined. \ No newline at end of file