07/11/15 01:59:11
>>324
配列要素数を超えたところを指すようにポインタに足し算すると未定義動作になる。
C99 6.5.6 p8 より( C++ では 5.7 p5 に同じ文面がある)
> If both the pointer operand and the result point to elements of the same array object, or one past the last element
> of the array object, the evaluation shall not produce an overflow; otherwise, the behavior is undefined.
この場合だと要素数 2 の char 配列とみなせるから、 2 までは大丈夫で 3 以上でアウトね。