What are some valid uses for negating twice in C? For example, something like:
if (!!my_cond) {
}
As I understand, the !!
will guarantee that the !!my_cond
will be 0 if my_cond
is false
and 1 otherwise. When would you ever need to use this?