What will be the order of evaluation for expressions.

Q13. What will be the order of evaluation for following expressions?

  1. i+5 >= j-6
  2. s+10 < p-2+2q
  3. i<j<k>l>=n

Ans. (1). First the arithmetic operators + and – are evaluated and then the relational operator is applied.

Ans.(2). First the arithmetic operators + and – are evaluated and then the relational operator is applied.

Ans.(3). Firstly the <(less than) operator is evaluated, then >(greater than) operator and then >=(greater than or equal).

Leave a Reply

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

444 Views
%d bloggers like this: