String literals in C are immutable

This commit is contained in:
boboman13 2014-08-30 11:48:02 -07:00
parent 79feae563b
commit d904cf0dea
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ let z = 2
<tr>
<td>
<pre>
char* s = "Hello World.";
char s[] = "Hello World.";
char s0 = s[0]; // 'H'
char *t = s; // Ptr to s
s[11] = '!';