Hi.
In the example you've pased, the && and || operators are applying to boolean expressions.
== is the equality operator; it evaluates the left and right hand operands, returning true if they are equal or false otherwise.
So, the expressions you have listed reduce as follows:
and
with regards to Q2:
& and | are
bitwise operators, whereas && and || are
boolean operators.
& and | apply at the bit level of the operands; that means that they evaluate every bit of the lhs operand against the corresponding bit in the rhs operand:
will print out
You can easilly check the above results by writing out the binary representation of 3 and 7, then doing bitwise anding and oring between the digits.
Q3: Not really, it's just something
you should know.
Jeremy