10th Oct 2017, 4:36 PM
rohit mishra
rohit mishra - avatar
16 Antworten
+ 14
x y || 0 0 0 0 1 1 1 0 1 1 1 1
10th Oct 2017, 5:01 PM
Babak
Babak - avatar
+ 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
10th Oct 2017, 4:55 PM
Babak
Babak - avatar
+ 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]
10th Oct 2017, 5:09 PM
Babak
Babak - avatar
+ 14
Which part, my friend?
10th Oct 2017, 4:58 PM
Babak
Babak - avatar
+ 14
It's a logical inclusive OR operator.
10th Oct 2017, 4:59 PM
Babak
Babak - avatar
+ 14
Any question?
10th Oct 2017, 5:02 PM
Babak
Babak - avatar
+ 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.
10th Oct 2017, 4:42 PM
Dapper Mink
Dapper Mink - avatar
+ 1
thanxx dude I understand
10th Oct 2017, 5:10 PM
rohit mishra
rohit mishra - avatar
+ 1
thanxx for helping me😊
10th Oct 2017, 5:10 PM
rohit mishra
rohit mishra - avatar
+ 1
thanx frnd
10th Oct 2017, 5:13 PM
rohit mishra
rohit mishra - avatar
0
tell me in deeply
10th Oct 2017, 4:55 PM
rohit mishra
rohit mishra - avatar
0
||part
10th Oct 2017, 4:58 PM
rohit mishra
rohit mishra - avatar
0
what's the meaning of || in this program
10th Oct 2017, 4:59 PM
rohit mishra
rohit mishra - avatar
0
|| this is or operator
10th Oct 2017, 4:59 PM
rohit mishra
rohit mishra - avatar
0
ok
10th Oct 2017, 5:03 PM
rohit mishra
rohit mishra - avatar
0
but how it's execute
10th Oct 2017, 5:03 PM
rohit mishra
rohit mishra - avatar