ExamVeda
Login
Home
This question belongs to C Program C Fundamentals
C Fundamentals
?

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: &&. 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.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.