Functions - Programming

Q1:

What will be the output of the following program?
#include<iostream.h> 
struct AptitudeArray
{
    int arr[5]; 
    public:
    void AptitudeFunction();
    void Display();
};
void AptitudeArray::AptitudeFunction()
{
    static int i = 0, j = 4; 
    i++;
    j--;
    if(j > 0)
        AptitudeFunction(); 
    int tmp = arr[i]; 
    arr[i]  = arr[j]; 
    arr[j]  = tmp; 
    i--;
    j++;
}
void AptitudeArray::Display()
{
    for(int i = 0; i < 5; i++)
        cout<< arr[i] << ' ';
} 
int main()
{
    AptitudeArray objArr = {{5, 6, 3, 9, 0}};
    objArr.AptitudeFunction();
    objArr.Display();
    return 0; 
}

A 5 6 3 9 0

B 0 9 3 6 5

C 0 5 6 3 9

D 0 6 3 9 5

E None of these

ANS:D - 0 6 3 9 5

No answer description is available. Let's discuss.