From e1d0e5756f08e9b84b6b729334e189c75e91b2c6 Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:37:12 -0600 Subject: [PATCH] vault backup: 2024-09-18 11:37:12 --- education/software development/ECE1400/Chapter.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/education/software development/ECE1400/Chapter.md b/education/software development/ECE1400/Chapter.md index 44c8ce8..d8e024d 100644 --- a/education/software development/ECE1400/Chapter.md +++ b/education/software development/ECE1400/Chapter.md @@ -39,4 +39,10 @@ printf("%d", i < j || k); (i > j) - (i < j) ``` -> 6. Is the following `if` statement lega \ No newline at end of file +> 6. Is the following `if` statement legal? + +```c +if (n >= 1 <= 10) + printf("n is between 1 and 10\n"); +``` +Yes the statement is *legal*, but it does not produce the intended effect. It would produce an output when `n` is zero because `0 >= 1` would evaluate to `0`, and `0 <= 10` is false. \ No newline at end of file