Other operators - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# Other operators

From cppreference.com
< c‎ | language

A collection of operators that do not fit into any of the other major categories.

Operator | Operator name | Example | Description
--- | --- | --- | ---
(...) | function call | f(...) | call the function f(), with zero or more arguments
, | comma operator | a, b | evaluate expression a, disregard its return value and complete any side-effects, then evaluate expression b, returning the type and the result of this evaluation
(type) | type cast | (type)a | cast the type of a to type
? : | conditional operator | a ? b : c | if a is logically true (does not evaluate to zero) then evaluate expression b, otherwise evaluate expression c
sizeof | sizeof operator | sizeof a | the size in bytes of a
_Alignof (since C11) | _Alignof operator | _Alignof a | the alignment required of the type of a

### [edit] See Also

- Operator precedence

Common operators
assignment | increment decrement | arithmetic | logical | comparison | member access | other
a = b a += b a -= b a *= b a /= b a %= b a &= b a |= b a ^= b a <<= b a >>= b | ++a --a a++ a-- | +a -a a + b a - b a * b a / b a % b ~a a & b a | b a ^ b a << b a >> b | !a a && b a || b | a == b a != b a < b a > b a <= b a >= b | a[b] *a &a a->b a.b | a(...) a, b (type) a ? : sizeof _Alignof (since C11)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/language/operator_other&oldid=47508"