From cf52e86347f5068d2d48701eea90f015cb9800db Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 2 Jul 2024 13:43:31 +0200 Subject: [PATCH 1/1] Pointers Are Complicated: fix typo --- personal/_posts/2018-07-24-pointers-and-bytes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/personal/_posts/2018-07-24-pointers-and-bytes.md b/personal/_posts/2018-07-24-pointers-and-bytes.md index 6accd7d..23371fe 100644 --- a/personal/_posts/2018-07-24-pointers-and-bytes.md +++ b/personal/_posts/2018-07-24-pointers-and-bytes.md @@ -79,7 +79,7 @@ It does *not* point at an actual element of another object *even if they have th The key point here is that just because `x_ptr` and `&y[0]` point to the same *address*, that does not make them *the same pointer*, i.e., they cannot be used interchangeably: `&y[0]` points to the first element of `y`; `x_ptr` points past the end of `x`. -If we replace `*x_ptr = 23` by `*&y[0] = 0`, we change the meaning of the program, even though the two pointers have been tested for equality. +If we replace `*x_ptr = 23` by `*&y[0] = 23`, we change the meaning of the program, even though the two pointers have been tested for equality. This is worth repeating: -- 2.30.2