int main()
{
int yarr[3] = { 5, 10, 15 };
int* ptr = yarr;
*ptr = 6; // set yarr[0] to 14 6
ptr++;
*ptr = 10; // set yarr[1] to 10
ptr += 1; // Already at yarr[1], so we only need to go one more to get to yarr[2]
ptr[0] = 14; // set yarr[2] to 6 14
while (ptr >= yarr)
{
cout << *ptr << endl; // print values (backwards)
ptr--;
}
}