Edit: A similar question asked earlier did not address some aspects related to the problem.
Kernighan and Ritchie say in the ANSI C book that the following equivalents
I do not see how this could be true for elements that occupy more than one address space, for example. Structures
Explain, please? Edit: Thanks for all the answers, but I don't quite understand. It would seem that I am experiencing the same confusion as @CucumisSativus, from his answer and comments on him.
For example, sizeof (* a) is 3. I thought that it will be so if for some reason I wanted to gain access to the middle byte of the first element in a: *(a+1).
Say that the address ais 10, and the size of each element is 20. And, say, we want to get a pointer to the second element. As I see it, we could do this: p = (10 + 20). I thought it would be equivalent &a[1].
I am having real problems explaining what I don’t understand!
Jodes source
share