title: c - if + else if + else in one line?
body: <p>I just got a question idea after having misunderstood a friend's statement.</p>
  
  <p>My friend told me: I just taught a colleague how to do a if/else in one line in c.</p>
  
  <p>Example:</p>
  
  <pre><code>int i = 0;
  i &lt; 0 ? printf("i is below 0") : printf("i is over or equal to 0");
  </code></pre>
  
  <p>For now, nothing new, it's called a ternary and most people know about that kind of statement BUT I first understood that:</p>
  
  <p>I just taught a colleague how to do a IF / ELSE IF / ELSE in one line.
  Since I don't / didn't know that doing such a thing is possible I tried to do something like</p>
  
  <pre><code>int i = 0;
   i &lt; 0 ? printf("i is below 0") : i == 0 ? printf("i equal 0") : printf("i is over 0");
  </code></pre>
  
  <p>Is it actually possible to do a if / else if / else "ternary". Or is there a way to do such a thing without having an horrible piece of code?</p>