+ 1

What is the diiference between && and // operator ?

3rd Aug 2016, 8:48 AM
Anantha Padmanabhan B
Anantha Padmanabhan B - avatar
4 odpowiedzi
+ 3
See the difference in truth table below. P Q P && Q P || Q T T T T T F F T F T F T F F F F T = true F = false P || Q will false only if both P and Q are false P && Q will true only if both P and Q are true
3rd Aug 2016, 10:12 AM
WPimpong
WPimpong - avatar
+ 1
&& means and, while || means or. So ask yourself, do you want a code to be complete if two statements match up, or if at least one statement meets your conditions.
3rd Aug 2016, 11:37 AM
James
James - avatar
+ 1
&& means and, // is comments, and || means or.
3rd Aug 2016, 2:46 PM
Aquarius
Aquarius - avatar
0
single ampersand(&) and single (|)pipeline character operators are known as bitwise operators and double && and || are known as AND or OR operators working both operators require two conditions for && operator result will be true when both conditions are true if either condition is false it will result FALSE but in case of it will result true if either condition is true nd it results false only when both conditions are false if(a>3&& b <9) in this case if any condition is not satisfied then it will result false if both conditions are true then it will result true
3rd Aug 2016, 8:41 PM
sachin tomar
sachin tomar - avatar