The bitwise NOT operator (~) performs a _______ operation on each bit of a number.
- negation
- AND
- OR
- XOR
The bitwise NOT operator (~) inverts each bit of a number. If the bit is 0, it becomes 1, and if it's 1, it becomes 0. This is essentially a negation operation on individual bits.
Loading...
Related Quiz
- How does a range-based for loop work in C++11 and above?
- The keyword _______ is used to specify that a function should be compiled inline.
- The use of _______ in nested if-else structures can sometimes enhance readability and maintainability of the code.
- When dealing with binary files, the ios::binary mode should be used in conjunction with another mode such as _______.
- What does the new operator do in C++?