Expression Statements
When an expression statement is executed, the expression is evaluated according to the rules outlined in Expressions and Assignments.
The expression evaluation has to be completed before the next statement is executed.
Syntax
expression-statement
:
expression
;
Example
These examples demonstrate expression statements:
In the last statement, the value returned by the add
function is increased by 1 and then assigned to the res
variable.
Last updated