From fa3005c373cfdd62f119b4ac13e1ab443f3b21dc Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Sun, 3 Nov 2024 14:05:04 -0700 Subject: [PATCH] vault backup: 2024-11-03 14:05:04 --- .../software development/ECE1400/Chapter 13 Exercises.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/education/software development/ECE1400/Chapter 13 Exercises.md b/education/software development/ECE1400/Chapter 13 Exercises.md index eeb7f51..62bec4f 100644 --- a/education/software development/ECE1400/Chapter 13 Exercises.md +++ b/education/software development/ECE1400/Chapter 13 Exercises.md @@ -1,3 +1,5 @@ > 1. The following function calls supposedly write a single new-line character, but some are incorrect. Identify which calls don't work and explain why. -b. `printf("%c", "\n");` - This is \ No newline at end of file +b. `printf("%c", "\n");` - This is invalid because the double quotes make `\n` a string, but it's being displayed with the `%c`formatting specifier. +c. `printf(%s, '\n');` - This is invalid because it's trying to display a `char` using the string formatting specifier. +e. `printf('\n'` \ No newline at end of file