[Solved] Uninitialized local variable ‘b’ used [closed]


Source you using is wrong multiple times.

int a,b,c; 
a=b++, c++;

first of all reading from uninitialized variables leads to UB, so you cannot predict what would be in a. Second, even if you would initialize b and c that expression is equal to:

(a=b++), c++;

to see behaviour predicted on that site you have to write:

a=( b++, c++ );

due to higher precedence of operator= over comma. Details can be found here

solved Uninitialized local variable ‘b’ used [closed]