What address is referenced by vPtr + 3? what value is stored at that location - C++ Data Type

C++ examples for Data Type:Array Pointer

Description

What address is referenced by vPtr + 3? what value is stored at that location

Demo Code

#include <iomanip>
#include <iostream>

int main(int argc, const char *argv[]) {
    const int SIZE = 5;
    unsigned int values[SIZE] = {2, 4, 6, 8, 10};
    unsigned int *vPtr;
    vPtr = values;//  w ww.j a  v a 2  s  .co  m

 
    std::cout << &*(vPtr + 3) << "\n" << *(vPtr + 3) << std::endl;


}

Result


Related Tutorials