What happens when a null pointer is converted into bool?
A. An error is flagged
B. bool value evaluates to true
C. bool value evaluates to false
D. the statement is ignored
Answer:A
What happens when a null pointer is converted into bool?
A. An error is flagged B. bool value evaluates to true C. bool value evaluates to false D. the statement is ignored
Explanation: A pointer can be implicitly converted to a bool. A nonzero pointer converts to true and zerovalued pointer converts to false.