Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

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

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

#include
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 

Answer: Option C