Which operator is used for logical NOT in C?
A. &&
B. !
C. &
D. |
Answer: Option B
Solution(By Examveda Team)
In C, the ! operator is used for logical NOT. It negates the value of a Boolean expression, turning true to false and false to true.Option A (&&) represents the logical AND operator, not logical NOT.
Option C (&) represents the bitwise AND operator, not logical NOT.
Option D (|) represents the bitwise OR operator, not logical NOT.
Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
Join The Discussion