Yes: int
to bool
conversion:
if(x=2) //2 is non 0 converts to true
Therefore it will print this is true
. A and D are the only remaining choices. And because of
else
cout <<"this is false"<<endl;
cout <<"this is all folks"<<endl; //not included in `else`, will print no matter what
this is all folks
will also print.
The correct answer is D.