C supports a rich set of operators, which are symbols used within an expression to specify the manipulations to be performed while evaluating that expression. C has operators for:
------------------------------------------------------------------------------
* arithmetic (+, -, *, /, %)
* equality testing (==, !=)
* order relations (<, <=, >, >=)
* boolean logic (!, &&, ||)
* bitwise logic (~, &, |, ^)
* bitwise shifts (<<, >>)
* assignment (=, +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=)
* increment and decrement (++, --)
* reference and dereference (&, *, [ ])
* conditional evaluation (? :)
* member selection (., ->)
* type conversion (( ))
* object size (sizeof)
* function argument collection (( ))
* sequencing (,)
* subexpression grouping (( ))
-------------------------------------------------------------------------------
C has a formal grammar, specified by the C standard.
Sunday, December 7, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment