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

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

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

#include
int val = 0;
class IndiaBix
{
public:
IndiaBix()
{
cout<< ++val; } ~IndiaBix() { cout<< val--; } }; int main() { IndiaBix objBix1, objBix2, objBix3; { IndiaBix objBix4; } return 0; }

[A].1234
[B].4321
[C].12344321
[D].12341234 

Answer: Option C