From 21dd78dedce704ec9cbd494f092a396668590542 Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:15:14 -0600 Subject: [PATCH] vault backup: 2024-10-28 11:15:14 --- education/software development/ECE1400/C.md | 6 +++++- .../software development/ECE1400/Chapter 12 Exercises.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/education/software development/ECE1400/C.md b/education/software development/ECE1400/C.md index cf70c29..5c20500 100644 --- a/education/software development/ECE1400/C.md +++ b/education/software development/ECE1400/C.md @@ -58,7 +58,11 @@ To update the value a pointer points at, you can dereference on the left hand si *p = 7; ``` -Because of how operator preci works +Because of how operator precedence works, parentheses should be placed around the dereference operator and the variable +```c +// Increment the value pointed to by `p` +(*p)++; +``` # Formatting specifiers # Standard library ## Formatting specifiers diff --git a/education/software development/ECE1400/Chapter 12 Exercises.md b/education/software development/ECE1400/Chapter 12 Exercises.md index 503197a..19223e9 100644 --- a/education/software development/ECE1400/Chapter 12 Exercises.md +++ b/education/software development/ECE1400/Chapter 12 Exercises.md @@ -24,4 +24,4 @@ The following expressions are illegal because of mismatched types: - (a) `p == a[0]` - Comparison between `int *` and `int` The rest of the expressions are true. -8.' \ No newline at end of file +8. \ No newline at end of file