C: flip integer value as a boolean

I'm looking a way to flip an integer value (8bits) using it as a boolean (0 -> False, 1 -> True).
On many languages you can do val = !val to change the value. The only thing I have done is val = (val == 1) ? 0 : 1. I don't know if in C can work with a bite value.

Комментарии

Популярные сообщения из этого блога

Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository … doesn't support architecture 'i386'

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target

Python Selenium - How to configure a client certificate file while initializing PhantomJS driver instance