Examveda
Examveda

Which operator is used for equality comparison in C?

A. ==

B. =

C. !=

D. <>

Answer: Option A

Solution(By Examveda Team)

In C, the == operator is used for equality comparison. It checks if the two operands are equal and returns true if they are, otherwise, it returns false.

Option B (=) is incorrect as it is the assignment operator, used to assign values to variables, not for equality comparison.
Option C (!=) is incorrect as it is the "not equal to" operator, used to check if two values are not equal.
Option D (<>) is not a valid equality comparison operator in C.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Related Questions on Operators and Expressions