Q22
Which operator is used for inequality comparison in C?
A.
!=
AnswerB.
<>
C.
==
D.
=
Answer: Option A
Solution
Answer: Option A
Solution:
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.