pls differentiate logical and & logical short circuit and | Sololearn: Learn to code for FREE!

+3

pls differentiate logical and & logical short circuit and

7/23/2016 7:28:50 AM

sreeraj g

4 Answers

New Answer

+2

the first & operator is a logical boolean operator that returns true if both inputs to the operator are true, whilst, there logical short circuit && terminates (short circuits) on a conditional statement where one of the boolean inputs is false and doesn't bother to evaluate the other input. the first & is primarily used in binary operations like in 0b0001 & 0b1000 = 0b0001

+1

so logical and will evaluate both operands and logical short circuit and wont?

0

0

thanx eric👍