Question Detail

COS 102 If staments Objective Question

Question

Which of the following relational operators correctly checks if two values are *not equal*?
Options
A ==
B !=
Correct Answer
C <>
D &&
Correct Answer

Option B is the correct answer.

Detailed Explanation

Page 10, 'Relational Operators' table, shows that '!=' is the operator for 'Not Equal To'. For example, '5 != 4' results in True.

Hint

Consult the 'Relational Operators' table on page 10 and find the operator corresponding to 'Not Equal To'.

Question Info