What is the difference between = and == operators in C language?
A. = is an assignment operator and == is an equality operator
B. = is an equality operator and == is an assignment operator
C. = and == are both assignment operators
D. = and == are both equality operators
Answer:A
What is the difference between = and == operators in C language?
A. = is an assignment operator and == is an equality operator B. = is an equality operator and == is an assignment operator C. = and == are both assignment operators D. = and == are both equality operators
Explanation:The assignment operator = transfers the right operand's value to the left operand. For instance, x = 10 gives the variable x the value 10. The equality operator == compares the operand values, returning 1 if they are equal and 0 otherwise. For instance, the expression x == 10 returns 1 if x equals 10 and 0 otherwise.