C - Variables and Data TypesWhich of the following type modifiers in C is used to store only non-negative values?AshortBsignedClongDunsignedCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand the meaning of 'unsigned'The 'unsigned' modifier means the variable can only hold zero or positive values, no negatives.Step 2: Compare with other modifiers'signed' allows negative and positive values, 'short' and 'long' change size but not sign.Final Answer:unsigned -> Option DQuick Check:unsigned = non-negative only [OK]Quick Trick: Unsigned means no negative numbers allowed [OK]Common Mistakes:Confusing 'signed' with 'unsigned'Thinking 'short' affects signAssuming 'long' means unsigned
Master "Variables and Data Types" in C9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More C Quizzes C Basics and Execution Environment - main function and program entry - Quiz 6medium C Basics and Execution Environment - Writing first C program - Quiz 15hard C Basics and Execution Environment - main function and program entry - Quiz 10hard Conditional Statements - Why conditional logic is needed - Quiz 8hard Conditional Statements - Why conditional logic is needed - Quiz 14medium Input and Output - Using printf for output - Quiz 15hard Input and Output - Using scanf for input - Quiz 10hard Operators and Expressions - Ternary operator - Quiz 6medium Operators and Expressions - Ternary operator - Quiz 5medium Operators and Expressions - Ternary operator - Quiz 13medium