Another explanation:
&& and || are logical operators (AND and OR respectively), and both operands are interpreted as being binary.
In your code, f() result is FALSE because it returns zero and g() is TRUE because it returns 4 (C interprets non-zero results as a logical TRUE). So, a AND...