MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
When is a compound condition using the logical operator “AND” true?
A
When either of the conditions are true
B
When both conditions are false
C
When both conditions are true
D
When the “NOT” operator is also used
Explanation: 

Detailed explanation-1: -The compound condition is true if both of the component conditions are true. It is false if at least one of the conditions is false. The compound condition is true if at least one of the component conditions are true.

Detailed explanation-2: -Logical Operators && is the logical and operator. It returns TRUE if both of the arguments evaluate to TRUE.

Detailed explanation-3: -The logical AND ( && ) (logical conjunction) operator for a set of boolean operands will be true if and only if all the operands are true . Otherwise it will be false .

Detailed explanation-4: -Using the OR operator, we can create a compound expression that is true when either of two conditions are true.

Detailed explanation-5: -As a Boolean operator, “AND” serves to indicate that ALL specified conditions must be met in order for a query to return true.

There is 1 question to complete.