| 1. |
3. Differentiate between prefix and postfix increment operators |
|
Answer» riend, here is your answer PLEASE follow me Answer: POSTFIX increment operator means the expression is evaluated first USING the original value of the variable and then the variable is incremented(increased).Prefix decrement operator means the variable is decremented first and then the expression is evaluated using the new value of the variable. In the prefix version (i.e., ++i), the value of i is incremented, and the value of the expression is the new value of i. So basically it first INCREMENTS then assigns a value to the expression. In the postfix version (i.e., i++), the value of i is incremented, however, the {value|the WORTH} of the expression is that the original value of i. So basically it first assigns a value to expression and then increments the variable. example given hope it helps you and you understood if helps please follow me |
|