The number of bytes in an array is always a multiple of the number of ____ in an array.

The number of bytes in an array is always a multiple of the number of ____ in an array.?

which one of these answewrs fit in the blank

A) iterators

B) elements

C) subscripts

D) indexes

the obvious choice will be A) elements, but the precise answer is size. some times, u declare an array with maximum size but the no of elements may be less than the max size…. in such case, the memory is not dependent on elements but on size.

eg: if the array is declared as int a[5] and only three elements are given, then the places a[3], a[4] are empty, but still occupy space. in that case,

memory in no of bytes = 8*5=40 bytes and not 8*3=24 bytes.

The number of bytes in an array is always a multiple of the number of ____ in an array.

Leave a Comment