Discussion :: Functions - C++
-
What will be the output of the following program?
#include struct Freshergate { int arr[5]; public: void GATEFunction(void); void Display(void); }; void Freshergate::Display(void) { for(int i = 0; i 5; i++) cout" " ; } void Freshergate::GateFunction(void) { static int i = 0, j = 4; int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp ; i++; j--; if(j != i) GateFunction(); } int main() { Freshergate objGate = {{ 5, 6, 3, 9, 0 }}; objGate.GateFunction(); objGate.Display(); return 0; }
Answer : Option A
Explanation :
No answer description available for this question.
Be The First To Comment

Whatsapp
Facebook