In C, a conditional expression is not an lvalue, nor is its
result.
Type of One Operand | Type of Other Operand | Type of Result |
---|---|---|
Arithmetic | Arithmetic | Arithmetic type after usual arithmetic conversions |
Structure or union type | Compatible structure or union type | Structure or union type with all the qualifiers on both operands |
void | void | void |
Pointer to compatible type | Pointer to compatible type | Pointer to type with all the qualifiers specified for the type |
Pointer to type |
C: The constant 0 cast as void* C++: NULL pointer (the constant 0) | Pointer to type |
Pointer to object or incomplete type | Pointer to void | Pointer to void with all the qualifiers specified for the type |
Related References
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.