QUIZ 38

What is the value of the expression for a=3,c=4 and d=0 ?

a<4||d>c||!d>6

a. 1
b. 0
c. Either of these
d. None of these

Answer : (a)

Logical negation operator has higher precedence over any arithmetic or relational operator.
So, evaluation can be thought for as :

((a<4)||(d>c))||((!d)>6)

Leave a Reply

Your email address will not be published. Required fields are marked *