Computer Applications

Given array int Z[ ] = {15, 16, 17} ; it will occupy …………… bytes in memory.

  1. 3
  2. 12
  3. 24
  4. 64

Java Arrays

6 Likes

Answer

12

Reason — int data type occupies 4 bytes in memory. The array Z[] has 3 elements. Thus, the array Z[] will occupy 4 bytes * 3 = 12 bytes in memory.

Answered By

4 Likes


Related Questions