|
|
|
|
|
by wruza
3464 days ago
|
|
Wait, wait. char *p = x;
p += 36; // overflow?
As arr == &arr, so are pointers P and Q that point just after last array item (1+&x[35]) and just after entire array (1+&x). As 6.5.6.8 above said, P is okay, and so must be Q. They said about last element, not second. Can you please explain why is x+1 even an argument?>if you're on a 16bit system and you define char x[36], the compiler guarantees that x's address is not more than 65500
65499? |
|
This is 6.3.6 "Additive operators" in ISO C90 standard, for anyone curious.