June 1994
Intermediate to advanced
384 pages
9h 28m
English
Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.
—Stan Kelly-Bootle
arrays are NOT pointers...why doesn’t my code work?...what’s a declaration? what’s a definition?...match your declarations to thedefinition...array and pointer differences...some light relief—fun with palindromes!
One of the first things that novice C programmers often hear is that “arrays are the same as pointers.” Unfortunately, this is a dangerous half-truth. The ANSI C Standard paragraph 6.5.4.2 recommends that you
Note the distinction between the declarations:
extern int *x;extern int y[];
The first declares x to be ...
Read now
Unlock full access