+ 2
Yes. && , || are logical operators, works as compound conditional expressions.. &, | are bitwise logical operators works at bit level manipulations.
13th Oct 2022, 9:12 AM
Jayakrishna 🇮🇳
+ 1
Anything , other than 0 value will be true in boolean equivalence. 0 means false. So 2&&4 is true && true => true true => 1 as integer value is the answer.
13th Oct 2022, 8:22 AM
Jayakrishna 🇮🇳
+ 1
Use bitwise and operator & => a&b printf("%d",a&b) a&b => 0010 & 0100 = 0000 a&&b => 2&&4 => true && true = true
13th Oct 2022, 9:01 AM
Jayakrishna 🇮🇳