T
Tim Rentsch
christian.bau said:As an example, if you have an array of 10 characters, and p points to
the fourth of these characters, and i is an int with a defined value,
then evaluating p + i invokes undefined behaviour if i < 4 or i > 6.
(As a boundary case, evaluating p + 6 would be legal even though it
doesn't point to any existing object).
If i < 3 or i > 7 (and p+7 in the last part). If a is the array, the
fourth element is a[3]. The element a[4] is the fifth element.