Write two separate statements that assign the starting address of array 'values' to pointer variable 'vPtr' - C++ Data Type

C++ examples for Data Type:Array Pointer

Description

Write two separate statements that assign the starting address of array 'values' to pointer variable 'vPtr'

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;/*from www .  j a va2 s .c  o m*/
    vPtr = &values[0];

}

Related Tutorials