Skip to content

Commit

Permalink
Language.
Browse files Browse the repository at this point in the history
  • Loading branch information
janpgit committed Apr 7, 2024
1 parent e4ae64f commit 2312ce0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/strings-and-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ printf("%c\n", p[1]); // will print 'e'

:heavy\_exclamation\_mark: Pointer initialized with a string literal **may not**
be changed in the same way as an array. The internal array created and
initialized from the string literal is in read-only by the specification.
Writing to it is an undefined behavior. Writing to it with `gcc` and `clang`
will crash the program. However, for example, [Oracle Developer
initialized from the string literal is read-only by the specification. Writing
to it is an undefined behavior. Writing to it with `gcc` and `clang` will crash
the program. However, for example, [Oracle Developer
Studio](https://www.oracle.com/application-development/technologies/developerstudio.html)
used to put such arrays into read-write memory by default in older versions.
So, working code compiled with an older version of that compiler and modifying
Expand Down

0 comments on commit 2312ce0

Please sign in to comment.