COMPUTER SCIENCE AND ENGINEERING
ALGORITHMS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Arithmetic
|
|
Relational
|
|
Booleon
|
|
None of the above
|
Detailed explanation-1: -Relational Operators (<, >, =, <=, >=, !=) True if x is equal to y. True if x is greater than y. True if x is less than y.
Detailed explanation-2: -Relational Operators It is used to compare two numbers by checking whether they are equal or not, less than, less than or equal to, greater than, greater than or equal to. == (Equal to)– This operator is used to check if both operands are equal. !=
Detailed explanation-3: -Relational Operators Supported Data Types The == and != operators can be used with any primitive data types as well as objects. The <, >, <=, and >= can be used with primitive data types that can be represented in numbers. It will work with char, byte, short, int, etc.
Detailed explanation-4: -The equality operators, equal to ( == ) and not equal to ( != ), have lower precedence than the relational operators, but they behave similarly. The result type for these operators is bool . The equal-to operator ( == ) returns true if both operands have the same value; otherwise, it returns false .
Detailed explanation-5: -"Option A : ! is not a relational operator, it is logical operator". Explanation : Option A is not a relational operator, it is a logical operator. Relational operators are >, <, >=, <=, ==, != .