Bird
0
0

You want to store 1000 integers in an array on a 64-bit system where int is 4 bytes. How much memory in bytes will the array consume?

hard📝 Application Q8 of 15
C - Variables and Data Types
You want to store 1000 integers in an array on a 64-bit system where int is 4 bytes. How much memory in bytes will the array consume?
A16000 bytes
B4000 bytes
C1000 bytes
D8000 bytes
Step-by-Step Solution
Solution:
  1. Step 1: Determine size of one int

    On 64-bit system, int is typically 4 bytes.
  2. Step 2: Calculate total size for 1000 ints

    Total size = 1000 x 4 = 4000 bytes.
  3. Final Answer:

    4000 bytes -> Option B
  4. Quick Check:

    Array size = element size x count = 4000 [OK]
Quick Trick: Multiply element size by count for total bytes [OK]
Common Mistakes:
  • Using 8 bytes for int
  • Confusing bytes with bits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes