I'm sure people do that (even though it's not necessary per some year C standard) but generally the pattern is actually for converting things which are not already 0 or 1 into 0 or 1. For example, you might want to use it here:
int num_empty_strings = !!(strlen(s1)) + !!(strlen(s2)) + !!(strlen(s3))
sweetjuly|2 years ago
stkdump|2 years ago
areyousure|2 years ago
simonkagedal|2 years ago
Here’s a thing you could do (but I don’t know why):
+= !(c-’s’) - !(c-’p’)