Which data type do you get when you add two bools?
Show answer and explanation
Both operands undergo integral promotion from bool to int, so adding two bool values produces an int. Its value is 0, 1, or 2.
Both operands undergo integral promotion from bool to int, so adding two bool values produces an int. Its value is 0, 1, or 2.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.