I have a doubt in usage of Boolean variable in below expression.
bool x,y;
x &= y; // expression 1 [which means x = x & y]
x &&= y; // expression 2 [which means x = x && y]
In above 2 expressions which one is correct and why ? Where x and y both are Boolean and I want to perform x = x && y operation.
Also if I use expression 2 in my C code I get a compilation error saying syntax error.
Doubts: Can we use bitwise AND on boolean variables ? Why I am getting compilation error in second expression?