In C, the real utility of it is that it’s an expression instead of a statement; that is, you can have it on the right-hand side (RHS) of a statement. So you can write certain things more concisely.
More Related Contents:
- ?: ternary conditional operator behaviour when leaving one expression empty
- Error: lvalue required in this simple C code? (Ternary with assignment?)
- What is the "–>" operator in C/C++?
- "." or "->" C struct accessor [duplicate]
- Logic behind sizeof operator [duplicate]
- which is faster assigning a number to the variable or changing the value of that variable either by adding or subtracting some number?
- How to work with a variable number of variables in C?
- What does the ??!??! operator do in C?
- What does the comma operator , do?
- What’s the difference between “mod” and “remainder”?
- What does the question mark and the colon (?: ternary operator) mean in objective-c?
- What does the question mark character (‘?’) mean in C++?
- What is short-circuit evaluation in C?
- What is a Question Mark “?” and Colon “:” Operator Used for? [duplicate]
- Why is sizeof considered an operator?
- !! c operator, is a two NOT?
- What does i = (i, ++i, 1) + 1; do?
- Precedence of && over || [duplicate]
- Why is the conditional operator right associative?
- What does =+ mean in C?
- “&&” and “and” operator in C
- Errors using ternary operator in c
- What does =+ (equals-plus) mean in C?
- Type result with conditional operator in C#
- Is this ternary conditional ?: correct (Objective) C syntax?
- In C, what is the difference between `&function` and `function` when passed as arguments?
- What is ‘:-!!’ in C?
- Does *p++ increment after dereferencing? [duplicate]
- Why can’t I cast a function pointer to (void *)?
- what does it mean to convert int to void* or vice versa?