Home » C++ Programming » Pointers » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    int array[] = {40, 15, 23, 71};
    int *p = (array + 2);
    cout << array;
    return 0;
    }
    1. 40
    2. 15
    3. 23
    4. 71
    5. Address of arr
Correct Option: E

As we counted to print only arr, it will print the address of the array.



Your comments will be displayed only after manual approval.