+ 5

How && operator works??????

28th Oct 2016, 3:53 PM
Shruti Singh
Shruti Singh - avatar
7 Answers
+ 5
The && is the fast "logical and" operator. "Logical and" means the operator returns only true, if both operands are non-zero and false otherwise. This can be used to save time. If the first operand is already zero, the second does not have to be evaluated because no matter what value the second operand has, the operator must return false. This is especially time-saving, if the operands are expensive function calls.
28th Oct 2016, 4:03 PM
Stefan
Stefan - avatar
+ 5
if both conditions are satisfied then true
9th Feb 2018, 7:14 PM
sarvesh hardikar
sarvesh hardikar - avatar
+ 2
in the && operator both the operands must be true for the entire execution to be true. if in two operands 1 is true and other is false then all the condition is false........
27th Nov 2016, 4:50 AM
Prabha Kumari
Prabha Kumari - avatar
0
&& operator gives true(1) if both the conditions applied to it are correct ex- void main() {int a=1,b=2; if(a==1&&b==2) cout<<a; } it will print 1 as both the conditions applied to & operator are correct.
7th Nov 2016, 12:17 PM
Sita Ram Uttam
Sita Ram Uttam - avatar
0
it is used as logical factor if a statement can have two possible answers then this symbol can be used
12th Nov 2016, 2:04 PM
Nandini Pandey
Nandini Pandey - avatar
0
example plz
13th Nov 2016, 2:39 PM
Kavish Hamza
Kavish Hamza - avatar
0
&& is logical operator which is used to combine more than one Conditions....
18th Dec 2016, 11:50 AM
Subham Mandal
Subham Mandal - avatar