here's an interesting little puzzle I found on another board:

given the following sequence:

int a=0, b=0, c=0, d=0;
b = ( a++, a++, 6+a );
d = ( c++, 6+c, c++ );

cout << "a = " << a << endl;
cout << "b = " << b << endl;
cout << "c = " << c << endl;
cout << "d = " << d << endl;

fill in the expected output for each variable below:
a =
b =
c =
d =

and explain your reasoning. Indicate any possible non-defined behaviors but assume the behaviors occur as expected.