S
Seebs
char p[] = "some string";
makes p an array whose contents you're not permitted to modify.
No it doesn't. That's an array whose contents are modifiable, with
an initializer.
Note... I'm actually not totally sure. I'd look it up if I were going
to write code which depended on this. I was having an interesting
conversation with a friend recently. One of the things you face when
programming, especially if you have to use a number of languages, is
that almost nobody can actually remember everything you need to know to
program effectively and reliably.
The secret to success in programming is not to know all this stuff; it's
to cultivate the awareness of when you don't quite know something, compared
to when you're quite sure. Ten years ago, I'd probably have just said
you were wrong. Now I know enough to spot even the faint hint of "wait,
is that right?" floating around.
Being sure of everything makes for horrible code. Being pretty sure most of
the time, but alert to the possibility that you might be misremembering
things, makes for much better programming.
-s