The logical and operator ‘&&’ expects its operands to be boolean expressions (either 1 or 0) and returns a boolean value.
The bitwise and operator ‘&’ works on Integral (short, int, unsigned, char, bool, unsigned char, long) values and return Integral value.
If an integral value is used as an operand for ‘&&’ which is supposed to work on boolean values, following rule is used in C.
…..A zero is considered as false and non-zero is considered as true.
For example in the following program x and y are considered as 1.
The ‘&&’ operator doesn’t evaluate second operand if first operand becomes false. Similarly ‘||’ doesn’t evaluate second operand when first operand becomes true. The bitwise ‘&’ and ‘|’ operators always evaluate their operands.