Pre-increment is an operator that increases the value of a variable before using it in an expression. It adds one unit to the original value and then returns the updated result.
Think of pre-increment like getting ready for school in the morning. Before leaving your house, you put on your shoes first and then tie them up tightly. Similarly, pre-increment takes care of increasing the value before performing any other operations.
Decrementing: Decrementing refers to decreasing the value of a variable by subtracting some quantity from it.
Post-increment: Post-increment is another type of incrementation where we increase the value after using it in an expression.
Incrementing: Incrementing is the general term for increasing the value of a variable, whether it's done before or after using it in an expression.
Study guides for the entire semester
200k practice questions
Glossary of 50k key terms - memorize important vocab
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.