How do you construct an increment and decrement instruction in c?
Answers
Answered by
0
Increment and decrement operators are unary operator that add or subtract one, to or from their operand , respectively. They are commonly implemented in imperative programming languages . C-like languages feature two versions (pre- and post-) of each operator with slightly different semantics.
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 of the expression is the resulting incremented (or decremented) value.
The post-increment and post-decrement operators increase (or decrease) the value of their operand by 1, but the value of the expression is the operand's original value prior to the increment (or decrement) operation.
Mark it brainliest!!!
Hope it help.
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 of the expression is the resulting incremented (or decremented) value.
The post-increment and post-decrement operators increase (or decrease) the value of their operand by 1, but the value of the expression is the operand's original value prior to the increment (or decrement) operation.
Mark it brainliest!!!
Hope it help.
Similar questions