/* array2.cpp CIS 250 2/6/05 David Klick Demonstration of pointer arithmetic. */ #include using std::cout; using std::endl; int main(void) { int num[] = { 2, 4, 6, 8, 10 }; int* p = num; for (int i=0; i<5; i++) { cout << i << ": " << p << " " << *p << endl; p++; } return 0; }