1.

What will be the output of the following program?

#include<iostream.h> class IndiaBix
{ int Num; public: IndiaBix(int x) { Num = x; } int BixFunction(void);
};
int IndiaBix::BixFunction(void)
{ static int Sum = 0; int Dec; Dec = Num % 10; Num = Num / 10; if((Num / 100)) BixFunction(); Sum = Sum * 10 + Dec; return Sum;
}
int main()
{ IndiaBix objBix(12345); cout<< objBix.BixFunction(); return 0; }

A. 123
B. 321
C. 345
D. 12345
E. 54321
Answer» D. 12345


Discussion

No Comment Found

Related MCQs