Ad Code

THREE NON EXCEPTIONAL PATHS?

THREE NON EXCEPTIONAL PATHS?


  • if (e.Title() == “CEO” || e.Salary() > 10000)
    if e.Title() == “CEO” is true then the second part is not evaluated and e.Salary() will not be called.
    cout will be performed
  • if e.Title() != “CEO” and e.Salary() > 10000
    both parts of the condition will be evaluated
    cout will be performed.
  • if e.Title() != “CEO” and e.Salary() <= 10000
    both parts of the condition will be evaluated
    cout will not be performed.
Reactions

Post a Comment

0 Comments