From 5fee60ba7b5dc5ada0a01b199a114d5b6cf15c0d Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:01:06 -0700 Subject: [PATCH] vault backup: 2024-11-10 21:01:06 --- .../software development/ECE1400/Chapter 15 Exercises.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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