I'm having a difficult time with operator precedence. Could somebody explain specifically part (A) why c=1. part (B) why the increment and decrement don't cancel each other out, part (C), what happens with c?
#include<iostream>
using namespace std;
int main(){
//A
long x = 3, y = 1;
long a, b, c;
a = b = x;
(c = b) = y;
cout << a << ", " << b << ", " << c <<endl; //3, 3, 1
//B
long x = 3, y = 10, z = 4;
long a = (--x)++;
long b = (z += y);
cout << a << ", " << b <<endl; // 2, 14
//C
long x = 3, y = 5;
long a, b, c;
a = x > y;
c = ((b = 13) || (b = 20));
cout << a << ", " << b << ", " << c <<endl ;
}