Question:

Which operator is used for logical AND?

Show Hint

Be careful with single vs double symbols: && is logical AND, while & is bitwise AND. In Python, the word and is used instead of symbols.
Updated On: Jun 3, 2026
  • &&
  • and
  • &
  • AND
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation


Step 1: Understanding the Question:

The question asks for the standard operator used to perform a logical AND operation in programming languages.

Step 2: Detailed Explanation:

$\bullet$ Logical operators are used to combine multiple boolean conditions and return a boolean result based on the truth values of the operands.
$\bullet$ In the majority of widely used programming languages (such as C, C++, Java, JavaScript, and C#), the double ampersand && is the standard symbol for logical AND.
$\bullet$ A logical AND operation evaluates to true if and only if both of its operands are true; otherwise, it evaluates to false.
$\bullet$ In contrast, a single ampersand & represents a bitwise AND operator, which performs operations at the binary digit level rather than evaluating overall logical truth.
$\bullet$ In some languages like Python, the keyword and is used for logical operations, but in standard computer science curriculum questions, && is typically the primary symbol taught.
$\bullet$ Thus, looking at the choices, both && and and are used in different environments, but && represents the classical symbolic logical AND operator across most C-family languages.

Step 3: Final Answer:

Thus, the operator used for logical AND in most standard programming languages is &&, matching option (A).
Was this answer helpful?
0
0