I was reviewing some code that a friend of mine wrote and was wondering what exactly this declaration did... (This is only a snippet) Code: bool x; bool y; x = y !=0; I have never seen this before.

yes, it ofen in use! int i, j= 3; it means that i and j are integer and their value is 3; first j is 3 and next i;

x=y !=0 x is equal to y, x and y are not equal to zero. Is that how we read this statement. i guess its normally used in boolean expressions or if statements.

No it is read as y!=0 which is y is initialized to true and then x is equal to y which is again initialized to true.