Start learning today, and be successful in your academic & professional career. Start Today!

• ## Related Services

### Operators & Expression

• Most operators work on two “parameters” and return a value
• Some operators work on just one
• One has three parameters
• Assignment operators designate “assigning” a value to a variable
• Arithmetic operators perform arithmetic on their parameters to return the arithmetic value
• Compound operators perform both arithmetic and assignment
• Increment /Decrement operators change their parameter by 1
• Comparison operators compare their parameters for equality, inequality, which is greater, etc. Their value is the “truth” of the comparison.
• Logical operators test the “truth” of their parameters
• Types can be “cast” into other types, sometimes with truncation
• Types can be “promoted” to larger types
• Operator precedence; operations are performed left to right, except certain operators are performed before others
• Expressions consist of Variables, constants, functions, and other expressions, connected with operators, to return a value
• Here is a link to a comprehensive list of C++ operators, include their precedence: http://www.cplusplus.com/doc/tutorial/operators/

### Operators & Expression

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

• Intro 0:00
• Overview 0:11
• Parameters for Operators 0:47
• Left Side vs. Right Side 1:56
• Example
• Operators - Assignment 3:40
• Assignment - Don't Confuse Readers 5:17
• Operators - Arithmetic 7:53
• Operators - Compound Assignment 9:38
• Operators: Increment / Decrement 10:24
• Examples
• Pre- vs. Post-Operator
• Operators - Comparators 12:19
• Operators - Logical 13:38
• Examples
• Operators - Boolean Truth Tables 15:45
• Examples
• Operators - Input and Output 18:42
• I/O Stream
• Operators - Type Casting, Sizeof 20:42
• 'Sizeof'
• Type-Casting Cautions 22:27
• Classic Example
• Type Promotion 25:46
• Operator Precedence 26:58
• Firth Things: Unary Operators
• Expressions 28:32
• Examples
• Cautions 30:17
• Classic Example
• Hey! Wrong Kind of Operator! 32:13