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

Cpp Programming Quiz 154 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

#include
class IndiaBix
{
public:
void Bix(int x = 15)
{
x = x/2;
if(x > 0)
Bix();
else
cout<< x % 2; } }; int main() { IndiaBix objIB; objIB.Bix(); return 0; }

[A]. The program will display 1.
[B]. The program will display 2.
[C]. The program will display 15.
[D]. The program will go into an infinite loop. 

Answer: Option D