Ternary operator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ranjitshs
    New Member
    • Mar 2009
    • 6

    Ternary operator

    what is the associativity of ternary operator?
    Explain with an example
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    I recommend that you NOT try to learn this. Hard as you might try to memorize this, it won't come up often enough in your coding practice -- you're bound to forget.

    Besides, even you do manage to keep this straight, the next guy reading your code won't.

    Preferred practice is to disambiguate your code with parentheses.

    Comment

    Working...