JAVA
what is the size of the memory required to store 15 elements of A(14)
I)long type data
ii)short integer type data
Answers
Answered by
0
long -64 bits or 8 bytes , short -32 bits or 4bytes
naskaranubhab03:
But it is told that 15 elements are to be stored
Answered by
1
Long type for 1 has 64 bits=8 bytes
For 15 elements it will have 15*8bytes
==>120 bytes
Short has 4 bytes alloted for each
Now for 15 elements short will have 4 bytes*15
=60 bytes
Thus the sizes are 120 bytes and 60 bytes
Hope it helps
===========================================================
Similar questions
Music,
7 months ago
Hindi,
7 months ago
Social Sciences,
1 year ago
Biology,
1 year ago
Chemistry,
1 year ago