// It doesn’t matter how many bytes an int is. The compiler handles // the scaling. p++ does not mean “add 1 to the pointer”, // it means “move the pointer to the next item”. // // Similarly, subtracting pointers yields the number of items, // not the number of bytes. #include using namespace std; int main() { int data[] = {11,22,33,44,55}; int *p = data; // p points to 11 p += 3; // p now points to 44 --p; // p now points to 33 cout << *p << '\n'; cout << p-data << '\n'; // Distance from start to 33’s location return 0; }