C - Operators and ExpressionsWhy does the expression (a && b) || (a && !b) simplify to just a in C?ABecause b cancels out in logical expressionsBBecause a AND (b OR NOT b) is always aCBecause a is always trueDBecause NOT operator negates aCheck Answer
Step-by-Step SolutionSolution:Step 1: Analyze the expression(a && b) || (a && !b) means a AND b OR a AND NOT b.Step 2: Apply distributive lawThis equals a AND (b OR NOT b). Since (b OR NOT b) is always true, expression equals a.Final Answer:Because a AND (b OR NOT b) is always a -> Option BQuick Check:Logical tautology simplifies expression [OK]Quick Trick: b OR NOT b is always true, so expression equals a [OK]Common Mistakes:Thinking b cancels outAssuming a is always trueMisunderstanding NOT operator
Master "Operators and Expressions" in C9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More C Quizzes C Basics and Execution Environment - Writing first C program - Quiz 10hard Conditional Statements - If–else statement - Quiz 1easy Conditional Statements - Why conditional logic is needed - Quiz 3easy Loop Control Statements - Continue statement - Quiz 1easy Loop Control Statements - Continue statement - Quiz 3easy Loops - For loop - Quiz 2easy Operators and Expressions - Operator precedence - Quiz 10hard Variables and Data Types - Why variables are needed - Quiz 10hard Variables and Data Types - Variable declaration and initialization - Quiz 10hard Variables and Data Types - Why variables are needed - Quiz 4medium