C++ Certified Associate Programmer (CPA-21-02) — Question 14

Which of the following operators accept integer arguments only? (Choose two.)

Answer options

Correct answer: A, C

Explanation

The correct answers are A and C because both the bitwise OR operator (|) and the bitwise NOT operator (~) require integer operands in order to function correctly. Options B and D are incorrect; B (||) is a logical OR operator that does not accept integer arguments exclusively, while D (!) is a logical NOT operator that can be used with boolean values, not strictly integers.