+ 1

What is the meaning of syntax if(a&&b) without any condition??????

5th Feb 2022, 7:36 PM
Gurmeet Singh
Gurmeet Singh - avatar
6 Respostas
+ 2
This acts like a condition. If atleast one of the two values is 0, only then the condition turns false. For all values except 0's in a and b, the statements following it is executed
5th Feb 2022, 7:46 PM
Adi Nath Bhawani
Adi Nath Bhawani - avatar
0
&& is AND operator. a&&b is true when a and b are true and is false otherwise. That means if a and b are true then executes the if block.
6th Feb 2022, 7:18 PM
Saikat Acharjee Joy
Saikat Acharjee Joy - avatar
0
But what where is the condition to which these variables are getting compared.....?
6th Feb 2022, 7:23 PM
Gurmeet Singh
Gurmeet Singh - avatar
0
a and b should contain value of boolean. Such as (x > y) or (x == 2) is accepted in the place of a and b.
6th Feb 2022, 7:33 PM
Saikat Acharjee Joy
Saikat Acharjee Joy - avatar