In C, relational operators always yield 0 or 1. So, this statement
count += last_word < (s + strlen(s) - 1);
adds either 0 or 1 to count
depending on the comparison's result. It can be written as (and equivalent to):
if (last_word < (s + strlen(s) - 1)) {
count = count + 1;
} else {
count = count + 0;
}
(The else
part is needless; added for explanatory purpose.)
C11 (draft N1548.pdf), Relational operators, §6.5.8, 6
Each of the operators < (less than), > (greater than), <= (less than
or equal to), and >= (greater than or equal to) shall yield 1 if the
specified relation is true and 0 if it is false. 107) The result has
type int.