0

What is the meaning of --b is it the value should be deduct or not?

21st Dec 2016, 11:00 PM
Asna Khalidah Mohd Shobri
Asna Khalidah Mohd Shobri - avatar
3 Answers
+ 6
--b uses a predecrement. Since it has a high priority, it decrements b by 1 before most other operations.
21st Dec 2016, 11:11 PM
Tamra
Tamra - avatar
+ 1
If you have an assignment, for example: b = 1; v = --b; it means that v takes the value of b after being decreased. So v will take value 0 and simultaneously b takes value 0. Otherwise, if you had v = b--; v would take value 1and then b would have value 0.
21st Dec 2016, 11:16 PM
Anna Papachristou
Anna Papachristou - avatar
+ 1
tq so much,guys
21st Dec 2016, 11:17 PM
Asna Khalidah Mohd Shobri
Asna Khalidah Mohd Shobri - avatar