Operators and Expressions
Arithmetic and Assignment Operators
Arithmetic and assignment operators are part of every programmer's daily toolbox. They are used to calculate new values, store those values, and typically these…
Comparison and Logical Operators
Comparison and logical operators help a program make comparisons of values in order to make choices about what to do. Comparison operators allow the program to…
Increment and Decrement Operators
C++ Increment and Decrement OperatorsIncrement and decrement operators add and subtract one from variables, respectively. The reason these operators exist is th…
Operator Precedence and Associativity
Operator precedence and associativity are what decide how operators in an expression are evaluated if there is more than one of them involved. Precedence is abo…
The Conditional Operator
The conditional operator is a concise way of picking one of two values, based on whether a condition is true or false. It's indicated by a question mark and a c…
Short-Circuit Evaluation
Short circuit evaluation is the name given to the fact that with logical operators && and ||, the program stops as soon as the result is known. The leftmost ope…