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

1 thought on “ What happens when a null pointer is converted into bool?”

  1. c
    Explanation: A pointer can be implicitly converted to a bool. A nonzero pointer converts to true and zero valued pointer converts to false.

Leave a Comment