#include // Showing how incrementing a pointer increments the address // by the size of the element that the pointer points to. int main( void ) { int a[] = { 1, 2,3, 4, 5, 6, 7 }; char c[] = "abcdefg"; int *pa = a; char *pc = c; cout << "pa is at " << pa << ", pa + 1 is at " << ( pa + 1 ) << endl; cout << "pc is at " << ( void * ) pc << ", pc + 1 is at " << ( void * ) ( pc + 1 ) << endl; cout << "sizeof( int ): " << sizeof( int ) << ", " << "sizeof( char ): " << sizeof( char ) << " and sizeof pa: " << sizeof pa << ", and sizeof pc: " << sizeof pc << endl; }