Common

Increment and decrement operators

Unary operators that add or subtract one from their operand, respectively

Increment and decrement operators

Common card · No. 445682

Increment and decrement operators are unary operators that increase or decrease their operand by one. They are commonly found in imperative programming languages. C-like languages feature two versions (pre- and post-) of each operator with slightly different semantics. In languages syntactically derived from B (including C and its various derivatives), the increment operator is written as ++ and the decrement operator is written as --. Several other languages use inc(x) and dec(x) functions. The increment operator increases, and the decrement operator decreases, the value of its operand by 1. The operand must have an arithmetic or pointer data type, and must refer to a modifiable data object. Pointers values are increased (or decreased) by an amount that makes them point to the next (or previous) element adjacent in memory. In languages that support both versions of the operators: The pre-increment and pre-decrement operators increment (or decrement) their operand by 1, and the value...

Read on Wikipedia

Open boosters, collect cards and trade them. Free to play.

Play for free
Increment and decrement operators – Common Wikipedia card | Wikiverse TCG