Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 10)
10.
Evaluate the following expression: 4 >6 || 10 < 2 * 6
Discussion:
3 comments Page 1 of 1.
By default said:
1 decade ago
In OR condition if one get false and other is true then it always returns true value.
Here 4 > 6 gives false value that is 0 so or operator moves forward and check for next condition that is 10 < 6 * 2 i.e.
10 < 12 so the operation evalutes to a true value.
Here 4 > 6 gives false value that is 0 so or operator moves forward and check for next condition that is 10 < 6 * 2 i.e.
10 < 12 so the operation evalutes to a true value.
Anand said:
1 decade ago
Check the precedence table of operators
'*' then '>' , '<' (left to right)
then '||'
4>6 is false
10 < 12 is true
false || true is always true.
'*' then '>' , '<' (left to right)
then '||'
4>6 is false
10 < 12 is true
false || true is always true.
Ravi said:
1 decade ago
How it is true. ?
Can any one Explain.
Can any one Explain.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers