InterviewSolution
Saved Bookmarks
| 1. |
Can you differentiate between “var++” and “++var”? |
|
Answer» EXPRESSIONS “var++” and “++var” are used for incrementing the value of the “var” variable. “var++” will first give the evaluation of expression and then its value will be INCREMENTED by 1, thus it is CALLED as post-incrementation of a variable. “++var” will increment the value of the variable by one and then the evaluation of the expression will take place, thus it is called pre-incrementation of a variable. |
|