From a8b53fdccb0c42fa9d275973abe49121a6ae5a0c Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:56:24 -0600 Subject: [PATCH] vault backup: 2024-10-01 20:56:24 --- .../ECE1400/Chapter 7 Exercises.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/education/software development/ECE1400/Chapter 7 Exercises.md b/education/software development/ECE1400/Chapter 7 Exercises.md index 23806b5..5f2538d 100644 --- a/education/software development/ECE1400/Chapter 7 Exercises.md +++ b/education/software development/ECE1400/Chapter 7 Exercises.md @@ -3,4 +3,24 @@ a. `short unsigned int` b. `short float` c. `long double` -d. `unsigned long` \ No newline at end of file +d. `unsigned long` + +Answer: +b. `short float` + +> 4. If `c` is a variable of type `char`, which of the following statements is illegal? + +```c +char c; +// A: +i += c; // i has type int +// B: +c = 2 * c - 1; +// C: +putchar(c); +// D: +printf(c); +``` + +Answer: +D is incorrect because `printf` operates on strings. \ No newline at end of file