Bird
0
0

Why does the char data type in C use 1 byte of memory?

hard📝 Conceptual Q10 of 15
C - Variables and Data Types
Why does the char data type in C use 1 byte of memory?
ATo store a single ASCII character
BTo store large numbers efficiently
CTo store floating point numbers
DTo store multiple characters
Step-by-Step Solution
Solution:
  1. Step 1: Understand purpose of char type

    char stores one character, usually from the ASCII set.
  2. Step 2: Memory size matches ASCII

    ASCII characters fit in 1 byte, so char uses 1 byte to store one character.
  3. Final Answer:

    To store a single ASCII character -> Option A
  4. Quick Check:

    char size = 1 byte for ASCII character [OK]
Quick Trick: char stores one ASCII character in 1 byte [OK]
Common Mistakes:
  • Thinking char stores numbers
  • Expecting char to hold multiple chars
  • Confusing char with float

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes