Nguyễn Hồng Yến
New member
What is the difference between && and &?
Answer
& is a bitwise operator and compares each
operand bitwise. It is a binary AND Operator and copies a bit to the result if it exists in both operands. … Whereas && is a logical AND operator and operates on boolean operands. If both the operands are true, then the condition becomes true otherwise it is false.
Answer
& is a bitwise operator and compares each
operand bitwise. It is a binary AND Operator and copies a bit to the result if it exists in both operands. … Whereas && is a logical AND operator and operates on boolean operands. If both the operands are true, then the condition becomes true otherwise it is false.