Loading video...
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
- Overview
- Parameters for Operators
- Left Side vs. Right Side
- Operators - Assignment
- Assignment - Don't Confuse Readers
- Operators - Arithmetic
- Operators - Compound Assignment
- Operators: Increment / Decrement
- Operators - Comparators
- Operators - Logical
- Operators - Boolean Truth Tables
- Operators - Input and Output
- Operators - Type Casting, Sizeof
- Type-Casting Cautions
- Type Promotion
- Operator Precedence
- Expressions
- Cautions
- Hey! Wrong Kind of Operator!

































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview