Skip to content

Commit

Permalink
Update c_memory_model.tex
Browse files Browse the repository at this point in the history
String literals are stored in read-only, not code (at least not in modern standards)
  • Loading branch information
jtschuler committed Apr 22, 2024
1 parent 0eae9e2 commit 8139759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion introc/c_memory_model.tex
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ \subsubsection{String literals are constant}
strcpy(ptr, "Will not work");
\end{lstlisting}

String literals are character arrays stored in the code segment of the program, which is immutable.
String literals are character arrays stored in the read-only data segment of the program, which is immutable.
Two string literals may share the same space in memory.
An example follows.

Expand Down

0 comments on commit 8139759

Please sign in to comment.