Recently, I came across a code where --> was used.
example:
int a = 5;
while(a-->0){
    //do something 'a' times
}
Is (a-->0) equivalent to (a-- > 0) or simply, ((a=a-1) > 0)?
If not, I want to know what's that operator called, and are there other similar operators. If so, then where are they mentioned?
Thanks
It's two operations. The postfix -- (a = a - 1 but effective on the next line) and a greater than. It's equivalent to something like
while (a > 0) {
    a = a - 1;
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With