Home / Questions / State the total size in bytes, of the arrays a[4] of char data type and p[4] of float data type.
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 to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

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.