From 0ab144ff976c7a701acef552cc8e33b38faa7dbc Mon Sep 17 00:00:00 2001 From: Levi Bostian Date: Sun, 1 Sep 2013 11:51:25 -0500 Subject: Add conditinal expression (?:) to C. --- c.html.markdown | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'c.html.markdown') diff --git a/c.html.markdown b/c.html.markdown index e6179ba6..ea047ea0 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -226,6 +226,10 @@ int main() { 0 || 1; // => 1 (Logical or) 0 || 0; // => 0 + //Conditional expression ( ?: ) + int a, b, z; + z = (a > b) ? a : b; // z = max(a, b); + //Increment and decrement operators: int j = 0; char s[]; -- cgit v1.2.3