1(xviii)
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?
- (a)25
- (b)200
- (c)50
- (d)100
Show SolutionHide Solution↓
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.