Difficulty: Easy
Correct Answer: 16 Bytes
Explanation:
Introduction / Context:
Decimal is the preferred numeric type for financial calculations due to its base-10 precision. This question asks for its exact size in memory.
Given Data / Assumptions:
Concept / Approach:
System.Decimal is a 128-bit type, which equals 16 bytes. It stores a 96-bit integer plus a scaling factor (number of decimal digits) and a sign, enabling precise decimal arithmetic without many of the rounding artifacts found in binary floating-point types.
Step-by-Step Solution:
Verification / Alternative check:
Use sizeof(decimal) (unsafe) or consult official documentation referencing Decimal's 128-bit layout.
Why Other Options Are Wrong:
They correspond to sizes of other primitives (Single 4 bytes, Double 8 bytes) or arbitrary distractors.
Common Pitfalls:
Confusing Decimal with Double since both represent fractional numbers; Decimal is larger and decimal-based.
Final Answer:
16 Bytes
Discussion & Comments