The first is local data you can edit (since the array is local data).
The second is a local pointer to global, static (constant) data. You are not allowed to modify constant data.
If you have GNU C, you can compile with -fwritable-strings to keep the global string from being made constant, but this is not recommended.
Reputation Points: 1140
Solved Threads: 229
Postaholic
Offline 2,039 posts
since Oct 2007