Two questions of pointers

From: Busin (businm_at_fidrep.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 15:18:37 GMT

1.
Given 2 address/pointers,

int* p1;
p1 = ...;

int* p2;
p2 = ...;

Is the difference, p2-p1, in bytes?

2.
int* p1;
p1 = ...;

int* p2;
p2 = p1 + 1;

Will p1 + 1 increment by 1 byte or by 4 bytes? In other words, what's the
difference between p2 and p2?

Thanks!