What is the value of "count" immediately before
the return statement above is executed?

Q

int count=0;
class obj
{
public: obj(){
count++;
}
~obj() {
count--;
}
};

main()
{
obj A,B,C,D ;
return 0 ;
}

What is the value of "count" immediately before
the return statement above is executed?
1) 0
2) 1
3) 2
4) 3
5) 4

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-04-25, 2674👍, 0💬