+ 6

What is the difference between& and &&?

There are two difference between them. .if they use as logical AND.both can be logical AND, when the & or && left or right expression results all is true the whole operation results can be true .when the both are false the result also false ...

15th Mar 2018, 5:28 PM
gowri
gowri - avatar
4 Answers
+ 8
& operator is a bitwise AND, whereas && operator is a logical AND. for more: https://www.codeproject.com/Articles/662248/Difference-between-and-and
15th Mar 2018, 5:49 PM
Baraa AB
Baraa AB - avatar
+ 3
& is used to acces memory of a variable and && is a logical (AND) operator....i mean in c++
17th Mar 2018, 11:50 AM
STRIKER
+ 2
number1 & number2 means... and operation of binary eqivalent of both.. 6&7 >>110&111 >>(1&1)(1&1)(0&1) >>110 >>6 & is bitwise and.. simply an AND GATE && is logical operator... general syntax if/while boolean && boolean boolean can be false or true
15th Mar 2018, 7:46 PM
sayan chandra
sayan chandra - avatar
0
& will add bit by bit of BCD number but && is used in the condition statement a=2. b=3 if(a<b && b>a) cout<<a; here in above code it's print "2" because both the condition in if statement is true
17th Mar 2018, 6:47 AM
Manjunath Angadi
Manjunath Angadi - avatar