C++ examples for Data Type:Array Pointer
Access next array element by add one to array pointer, *(arrayName + i)
#include <iostream> using namespace std; int main()/* w w w .j a v a2s. c om*/ { const int ARRAYSIZE = 5; int i, grade[ARRAYSIZE] = {98, 87, 92, 79, 85}; for (i = 0; i < ARRAYSIZE; i++) cout << "\nElement " << i << " is " << *(grade + i); cout << endl; return 0; }