Skip to content

Commit

Permalink
On arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
janpgit committed Apr 7, 2024
1 parent 0c708a3 commit e4ae64f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/strings-and-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ We already know that one can use an array notation with pointers. So, if you
printf("%c\n", "hello, world"[1]); // will print `e`
```
or even this:
```C
printf("%c\n", 1["hello, world"]); // will also print `e`
```

## Strings and pointers

Given that a string constant is a pointer to its first character, we can use it
Expand Down

0 comments on commit e4ae64f

Please sign in to comment.