Pointer arithmetic and array variables in C++