(?)
Quotes are added by the Goodreads community and are not verified by Goodreads. (Learn more)

“When Arrays Are Pointers The C standard has the following to say about the matter. Rule 1. An array name in an expression (in contrast with a declaration) is treated by the compiler as a pointer to the first element of the array1 (paraphrase, ANSI C Standard, paragraph 6.2.2.1). 1. OK nitpickers, there are a few minuscule exceptions that concern arrays treated as a whole. A reference to an array is not replaced by a pointer to the first element when: • the array appears as the operand of sizeof()—-obviously you want the size of the whole array here, not just a pointer to it. • the array’s address is taken with the & operator. • the array is a string or wide-string literal initializer. Rule 2. A subscript is always equivalent to an offset from a pointer (paraphrase, ANSI C Standard, paragraph 6.3.2.1). Rule 3. An array name in the declaration of a function parameter is treated by the compiler as a pointer to the first element of the array (paraphrase, ANSI C Standard, paragraph 6.7.1).”

Peter van der Linden, Expert C Programming: Deep Secrets
Read more quotes from Peter van der Linden


Share this quote:
Share on Twitter

Friends Who Liked This Quote

To see what your friends thought of this quote, please sign up!

0 likes
All Members Who Liked This Quote

None yet!


This Quote Is From

Expert C Programming: Deep Secrets Expert C Programming: Deep Secrets by Peter van der Linden
851 ratings, average rating, 48 reviews

Browse By Tag