Im making a pointer that works with an array and im trying to get the output but it just gives me a big number and not the array element. when i ran it i got: 2130567168
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
usingnamespace std;
int names()
{
int array[] = {10,15,23,12};
int *pArray = &array[5];
return *pArray;
}
int main()
{
cout << names();
}