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

Short Answer
Views 22

Answer:

  • 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.

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.