Multiple choice technology programming languages

Which of the following operators can be used both as an integer bitwise operator and a boolean logical operator?

  1. ^

  2. !

  3. &

Reveal answer Fill a bubble to check yourself
A,C,D Correct answer
Explanation

The ^ (XOR), & (AND), and | (OR) operators can be used both as integer bitwise operators (operating on individual bits) and boolean logical operators (operating on boolean values). The ! operator is only a boolean logical operator (logical NOT) and has no integer bitwise counterpart.