Arithmetic of the pointer is performed by the size of the static type [*] of the pointer, so it effectively adds sizeof *ptr. Alignment of elements will be taken into account in the size of the object, as type alignment (filling at the end of the object).
struct test {
int a;
char b;
};
The size testwill not be 5 (assuming a 32-bit int) if the 4-byte type is aligned.
[*] , ++ , , :
struct base { int x; };
struct derived : base { int y; };
int main() {
base * p = new derived[10];
base * q = p+1;
}