Which operator is used for inequality comparison in C?
A. !=
B. <>
C. ==
D. =
Answer: Option A
Solution(By Examveda Team)
In C, the != operator is used for inequality comparison. It checks if two values are not equal and returns true if they are not equal, otherwise, it returns false.Option B (<>) is not a valid inequality comparison operator in C.
Option C (==) represents the equality operator, used to check if two values are equal, not for inequality comparison.
Option D (=) is the assignment operator, used to assign values to variables, not for comparison.
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