+ 1

a=b++, a=++b what different between it....?

28th Oct 2018, 8:04 PM
Ayon
Ayon - avatar
2 Réponses
+ 3
The difference between prefix and postfix forms of incremental/decremental operators is in order of operations. b = 5; a = ++b; // a = 6, b = 6 Firstly, b is increased by 1, after that its value is assigned to a. a = b++; // a = 6, b = 7 b value is assigned to a variable, then b will be increased by 1.
28th Oct 2018, 8:28 PM
microBIG
microBIG - avatar
+ 3
this question has been asked multiple multiple times. use search bar. https://www.sololearn.com/discuss/1316935/?ref=app https://www.sololearn.com/post/10362/?ref=app
28th Oct 2018, 9:40 PM
Roneel
Roneel - avatar