?
Which operator is used for 'logical AND' in C?
Answer & Solution
Correct Answer:
Option
A
The operator used for 'logical AND' in C is Option A:
So, the correct answer is:
Option A:
Here's an example of using the logical AND operator in C:
In this example, the code within the if statement will be executed only if both 'x' and 'y' are true.
&&. The && operator is used to perform a logical AND operation, which returns true if both of its operands are true, and false otherwise.So, the correct answer is:
Option A:
&&Here's an example of using the logical AND operator in C:
if (x && y) { // Code to be executed if both x and y are true}In this example, the code within the if statement will be executed only if both 'x' and 'y' are true.
Join the Discussion
Login to post a comment or share your explanation.
Login