+ 1

|| and &&

meaning. I've just completed a challenge In C++ and the questions contanis && and || operators. but i didn't see them yet in my course. i supouse the || is different and && is AND

30th Dec 2016, 3:34 PM
Cosmin Teodor Iordache
Cosmin Teodor Iordache - avatar
4 ответов
+ 10
|| is OR && is AND
30th Dec 2016, 3:38 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
|| is or && is and For example: if(a==2 || b==3) { cout << "Hello" << endl; } this will print Hello when a=2 OR b=3 if(a==2 && b==3) { cout << "Hello" << endl; } this will print Hello only when a=2 AND b=3
30th Dec 2016, 3:38 PM
Axi Pol
Axi Pol - avatar
+ 4
in || any of condition must be true and in && both must be true to give true
30th Dec 2016, 4:52 PM
Sandeep Chatterjee
+ 1
Got it! Thanxs guys.
30th Dec 2016, 3:39 PM
Cosmin Teodor Iordache
Cosmin Teodor Iordache - avatar