0
How it's executed
16 Réponses
+ 14
x y ||
0 0 0
0 1 1
1 0 1
1 1 1
+ 15
int i = 4;
int j = -1;
int k = 0;
int w;
// From left to right
// (4 || -1 ) || 0
// true || 0
// true
w = i || j || k;
cout << w; // Output: 1
+ 15
it's obvious, my friend. If you have problem with understanding logical operators, then you probably need to review your lessons. Here is a link for you to review.
[https://www.tutorialspoint.com/cplusplus/cpp_logical_operators.htm]
+ 14
Which part, my friend?
+ 14
It's a logical inclusive OR operator.
+ 14
Any question?
+ 2
w = i||j||k; sets w to either true or false (1 or 0) if the statement "i||j||k" is true meaning at least one of the variables i, j or k is not null.
+ 1
thanxx dude I understand
+ 1
thanxx for helping me😊
+ 1
thanx frnd
0
tell me in deeply
0
||part
0
what's the meaning of || in this program
0
|| this is or operator
0
ok
0
but how it's execute