Re: Does *&s1 refer to the first member of structure variable s1



Christopher Benson-Manica wrote:

Eric Sosman <Eric.Sosman@xxxxxxx> wrote:

Yes. A pointer to a struct can be converted to a
pointer to the struct's first element (if it is possible
to make such a pointer at all), and vice versa.

Can you cite C&V on this? I know it's there somewhere, but my
first guess (6.7.2.1) proved to be wrong.

It's inside 6.7.2.1 p13:

[...] A pointer to a structure object, suitably converted, points
to its initial member [...], and vice versa.

Ralf



.



Relevant Pages