Logical Operator

0

                                       Logical Operator

They are used to combine two or more conditions using operators. There are 3 kind of operators: And(&&) , OR( || ), Not ( ! )



S.NO. Operators                                             Description
1
AND( &&) Its combine two conditions using (&&) operator and
iff both conditions are true then only that particular block of code
start executing otherwise compiler decline that blocks executing that block
Syntax:-
2.
 OR ( || ) Its combine two conditions using OR (||) operator and
if anyone condition is true then only that particular block of code
start executing otherwise compiler decline that blocks executing that block
Syntax:-
3
 Not ( !) It works with one condition and converts the result as if the condition is true but after putting Not the result is False vice versa.
Syntax:-


Post a Comment

0Comments

We you have any doubt let me know :)

Post a Comment (0)
To Top