✏️ Explanatory Question

State the total size in bytes, of the arrays a[4] of char data type and p[4] of float data type.

👁 128 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

  • a[4] (array of char): Each char occupies 2 bytes, so the total size is 2 * 4 = 8 bytes.
  • p[4] (array of float): Each float occupies 4 bytes, so the total size is 4 * 4 = 16 bytes.