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