a
is array of integers, if I try to subtract the address value of &a[2] - &a[1] == ?
what should the result be 4 or 1 ?
EDIT: see 4th comment on top answer here why he says 1 ?? this is why I'm confused I thought it will be 4
EDIT: here is a test
&a[2]
is same as &(*(a + 2))
(i.e (a + 2)
) and &a[1]
is same as &(*(a + 1))
(i.e. (a + 1)
). So answer will be 1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With