Question:

Which of the following is the bitwise operator ?

Show Hint

Common bitwise operators include AND , OR ), XOR , NOT , left shift , and right shift .
  • ++
  • $ \ll $
  • \#\#
  • %%
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Define a bitwise operator.
A bitwise operator performs operations on one or more binary numerals at the level of their individual bits.

Step 2: Analyze the given operators.

(A) \( \texttt{++} \): The increment operator, which increases a numeric value by one.

(B) \( \texttt{<<} \): The bitwise left shift operator. It shifts the bits of a number to the left, effectively multiplying it by a power of two. This is a bitwise operator.

(C) \( \texttt{\#\#} \): The token-pasting (concatenation) operator used by the C/C++ preprocessor.

(D) \( \texttt{\%\%} \): Not a standard operator in C/C++; the single percent, \( \texttt{\%} \), is the modulo operator.

Conclusion: The bitwise operator among the choices is \( \texttt{<<} \).

Was this answer helpful?
0
0