Docsity

CS192 Operators: Unary, Binary, Ternary, Logical, Relational, Bitwise, and Scope, Slides of Computer Programming

Partial preview of the text

Download CS192 Operators: Unary, Binary, Ternary, Logical, Relational, Bitwise, and Scope and more Slides Computer Programming in PDF only on Docsity!

1

CS 192Lecture 6Fall 2011

December 28, 2011Ghufran Ahmed

2

Operators (Unary, Binary, Ternary)• Arithmetic

-^ Assignment

-^ Increment – Decrement

++, -- (pre, post)

-^ Pointer

& address operator* indirection operator (de-referencing operator)

-^ Insertion, Extraction

4

Operator Precedence

  • Who comes before• Who comes after

5

Operator Associativity

  • Left-to-right• Right-to-left