result of expression if age=25, age=65, age=85 age > 65 ? 350 : 100

Q25. What will be the result of following expression if

  1. age=25
  2. age=65
  3. age=85 ?

age > 65 ? 350 : 100

Ans.

  1. age=25

age > 65 ? 350 : 100

25 > 65 ? 350 : 100

100

2. age=65

age > 65 ? 350 : 100

65 > 65 ? 350 : 100

100

3. age=85

age > 65 ? 350 : 100

85 > 65 ? 350 : 100

350

Leave a Reply

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

%d bloggers like this: