Computer Applications

The sales made by 5 salesmen selling 5 products is stored in a two-dimensional array of integer data type. How many bytes does the array occupy?

  1. 25
  2. 200
  3. 50
  4. 100

Values & Data Types Java

3 Likes

Answer

100

Reason — The data is stored in a two-dimensional array for 5 salesmen and 5 products, so total elements = 5 × 5 = 25. Each element is of type int, and in Java an int occupies 4 bytes. Therefore, total memory required = 25 × 4 = 100 bytes.

Answered By

2 Likes


Related Questions