Home » C++ Programming » Arrays » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    int array[] = {41, 15, 61, 27};
    int *ptr = (array + 3);
    cout << *ptr;
    return 0;
    }
    1. 41
    2. 15
    3. 61
    4. 27
    5. None of these
Correct Option: D

In this program, we are making the pointer point to next value and printing it.



Your comments will be displayed only after manual approval.