+ 5
How && operator works??????
7 odpowiedzi
+ 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.
+ 5
if both conditions are satisfied then true
+ 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........
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.
0
it is used as logical factor if a statement can have two possible answers then this symbol can be used
0
example plz
0
&& is logical operator which is used to combine more than one Conditions....