• OPERATOR PRIORITY AND ASSOCIATIVITY
• COUNTERS AND ACCUMULATORS
DIFF BETWEEN SOP AND SOPLN
ESCAPE SEQUENCE
PRIMITIVE AND NON PRIMITIVE DATATYPES
EXAMPLES
SIZE IN BITS AND BYTES
TYPE CONVERSION
********************************************************************
OPERATOR PRIORITY and ASSOCIATIVITY
Operators Precedence Associativity
Parentheses (), [] Left to Right
postfix expr++ (post-increment), expr—( post-decrement) Right to left
++expr (pre-increment) , --expr (pre-decrement) , Right to left
Prefix and
+expr(Unary plus), -expr(Unary minus) , ~ ! (Unary
unary
logical negation), (type) Unary type cast
arithmetic * / % Left to right
arithmetic + - Left to right
< (less than) , > (greater than), <= (less than or equal to) , Left to right
relational
>= (greater than or equal to)
equality = =(equality) != (not equal to) Left to right
logical AND && Left to right
logical OR || Left to right
ternary ?: Right to left
assignment = += -= *= /= %= &= ^= |= <<= >>= >>>= Right to left
Difference between counters and accumulators
To count repetitions, we use a variable called counter. An accumulator is similar to the counter.
It is initialised to zero and is incremented in each repetition with different values. The result is
that the variable accumulates the sum of the values added in each repetition. While they must
have both an initial value and an incremental value