Anonymous

How Do You Differentiate Relational Operators And Logical Operators?

2

2 Answers

raaga Profile
raaga answered
The logical operators and relational operators are most commonly used in computations where we need some comparisons between values. These both type of operators, logical operators and relational operators are binary in nature that is they both require two operands to be evaluated. These both types of operators are Boolean operators. They result either true or false after calculations.

There may be different ways to represent true or false values. These both operators differ from one another in different aspects.The relational operators are used to compare two values to determine that which is greater, which is smaller or whether both are equal or not.

There are different relational operators like <, >, =, <>, <=, >= etc.
These operators return a Boolean value (either true or false) that we can use in subsequent calculations accordingly. The operands of relational operators may be a numeric variables, literal numbers or arithmetic expressions.

In the case of logical operators, the operands may be Boolean values, Boolean variables or Boolean expressions. The logical operators compare these Boolean values together and return a Boolean result. The common logical operators are AND, NOT and OR. These are used when we need to make a comparison that requires multiple conditions evaluation. these operators checks these multiple conditions and give a result .

Answer Question

Anonymous