Computer Science, asked by Anonymous, 19 days ago

what are logical operators?​

Answers

Answered by priyanshiuchil
1

Answer:

In logic, a logical connective is a symbol or word used to connect two or more sentences in a grammatically valid way, such that the value of the compound sentence produced depends only on that of the original sentences and on the meaning of the connective.

Hope it's helpful to you

Have a great day ahead

Answered by SƬᏗᏒᏇᏗƦƦᎥᎧƦ
87

Question :-

♦ What are logical operators ?

Answer :-

_____________________

Logical operators:

Logical operators operate only on boolean operands and is used to construct complex descision making expressions.

_____________________

Some logical operators are as follows :-

To understand the concept clearly.

___________________________

Logical AND Operator (&&)

The logical AND operator (&&) is a binary operator and is used to combine two conditions or expressions. The resultant value is a boolean value. The result is true if both the values are true, and the result is false if either of the value is false.

It has the following syntax:

operand1 && operand2

Logical OR Operator ( | | )

The logical OR operator is a binary operator and is used to combine two conditions or expressions. The resultant is true if either of its operand true, or if both are true.

It has the following syntax:

operand1 | | operand2

Logical NOT Operator (!)

The logical NOT operator is a unary operator and is written in front of a single operand. The logical NOT operator negates the resultant of the expression following it i.e., if the expression returns a true value then the logical NOT operator will return false, and vice versa.

It has the following syntax:

! operand

___________________________

Similar questions