10. Example 01/08/11 By Jag a=16 b=25; x=(a>b) ? a : b; if (a>b) x=a; else x=b;
11. Bitwise operators 01/08/11 By Jag Operator Meaning & Bitwise AND | Bitwise OR ^ Bitwise Exclusive << Shift left >> Shift right
12. Result of logical Bitwise Operation 01/08/11 By Jag op1 op2 op1&op2 op1|op2 op1^op2 1 1 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0
13.
14. Bitwise Exclusive OR x - - -> 0000 0000 0000 1101 y - - -> 0000 0000 0001 1001 x^y - - -> 0000 0000 0001 0100 01/08/11 By Jag
15.
16.
17. Relational Operators 01/08/11 By Jag Operator Meaning < is less than <= is less than or equal to > is greater than >= is greater than or equal to == is equal to != is not equal to
26. Summary of C operator 01/08/11 By Jag Description Operator Rank Associativity Function call Array element reference ( ) [] 1 Left to right Unary plus Unary minus Increment Decrement Logical negation Ones complement Address Size of an object + - ++ -- ! ~ & Sizeof 2 Right to left Multiplication Division Modulus * / % 3 Left to right Addition Subtraction + - 4 Left to right Left shift Right shift << >> 5 Left to right Less than Less than equal to Greater than Greater than equal to < <= > >= 6 Left to right Equality Inequality = = |= 7 Left to right
27. Continue…. 01/08/11 By Jag Bitwise AND & 8 Left to right Bitwise XOR ^ 9 Left to right Bitwise OR | 10 Left to right Logical AND && 11 Left to right Logical OR || 12 Left to right Conditional operator ?: 13 Right to left Assignment operator = *=/=%= +=-=&= ^=|= << = >>= 14 Right to left Commas operator , 15 Left to right