Vidyalelo
C Programming · Q22

Operators and Expressions

Programming · C Programming · question 22

Q22

Which operator is used for inequality comparison in C?

A.
!=
Answer
B.
<>
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.