Cpp Programming Quiz 195 – What will be the output of the following program?

Question: What will be the output of the following program?

#include
struct BixArray
{
int arr[5];
public:
void BixFunction();
void Display();
};
void BixArray::BixFunction()
{
static int i = 0, j = 4;
i++;
j--;
if(j > 0)
BixFunction();
int tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
i--;
j++;
}
void BixArray::Display()
{
for(int i = 0; i < 5; i++) cout<< arr[i] << " "; } int main() { BixArray objArr = {{5, 6, 3, 9, 0}}; objArr.BixFunction(); 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 

Answer: Option D