#include "stdafx.h"
#include iostream
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int NumbHold[5];
int * ptrNumb;
ptrNumb= NumbHold;
*ptrNumb= 10;
ptrNumb++;
*ptrNumb= 20;
ptrNumb= &NumbHold[2];
*ptrNumb= 30;
ptrNumb= NumbHold + 3;
*ptrNumb= 40;
ptrNumb= NumbHold;
*(ptrNumb+4) = 50;
for (int n=0; n<5; n++)
cout << NumbHold[n] << ", ";
cout << endl;
return 0;
}
Output:
10, 20, 30, 40, 50,