Bird
0
0

Identify the error in this C declaration:

medium📝 Debug Q14 of 15
C - Variables and Data Types
Identify the error in this C declaration:
unsigned signed int num;
AMissing variable name
BShould use 'long' instead of 'signed'
CCannot combine 'unsigned' and 'signed' modifiers
DNo error, valid declaration
Step-by-Step Solution
Solution:
  1. Step 1: Understand modifier compatibility

    'unsigned' and 'signed' are opposite modifiers and cannot be combined together.
  2. Step 2: Check declaration validity

    Combining both causes a syntax error; variable name is present, so no missing name error.
  3. Final Answer:

    Cannot combine 'unsigned' and 'signed' modifiers -> Option C
  4. Quick Check:

    unsigned + signed = invalid [OK]
Quick Trick: Don't mix 'unsigned' and 'signed' together [OK]
Common Mistakes:
  • Thinking both can be combined
  • Ignoring opposite meanings
  • Assuming 'signed' is default and can be added

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes