?
Which operator is used to perform a bitwise AND operation in C?
Answer & Solution
Correct Answer:
Option
C
In C, the & operator is used to perform a bitwise AND operation. It performs a bitwise AND between corresponding bits of two integers. It returns a new integer where each bit is the result of ANDing the corresponding bits of the operands.
Option A (&&) represents the logical AND operator, which is used for logical comparisons, not bitwise operations.
Option B (|) represents the bitwise OR operator, which performs bitwise OR operations, not bitwise AND.
Option D (||) represents the logical OR operator, used for logical comparisons, not bitwise operations.
Option A (&&) represents the logical AND operator, which is used for logical comparisons, not bitwise operations.
Option B (|) represents the bitwise OR operator, which performs bitwise OR operations, not bitwise AND.
Option D (||) represents the logical OR operator, used for logical comparisons, not bitwise operations.
Join the Discussion
Login to post a comment or share your explanation.
Login