Is the C standard means to ensure that the logical operations ( ==, !=, >, &&, ||, etc.) always have the same meaning for the submission of truthfulness? In other words, do they always return some positive constant, if true, or is this the only guarantee that it will be a positive number?
The reason I ask for this is to know if statements like the ones below are. This expression must be true if both pointers are NULL or both pointers point somewhere (not necessarily the same thing).
if ((ptr1 == NULL) == (ptr2 == NULL))
source
share