Just studying the C style of Jon Bentley's Programming Pearls and was wondering if someone could please explain to me the following two pieces of C syntax:
A for
with no init condition (see line 2 in wordncmp in the file above):
for ( ; *p == *q; p++, q++)
and the semantic difference between
char *word[800000];
and
char word[800000];
since I thought arrays were just pointers to, in this case, word[0]
.
Answer choice explanation: Ok, as the rest of the community, I was torn between accepting dmckee or CAbbott answer. They both have important pieces of knowledge that I appreciate. I've accepted CAbbott answer because it was simpler, but gave an upvote to dmckee. As fair as I could go without accepting two answers. Thanks.