In an array, the ___________ gives the maximum number of elements that can be stored.
- Size
- Length
- Capacity
- Count
The correct option is "Capacity." In arrays, capacity refers to the total number of elements that can be stored. It is determined during the array's initialization and remains fixed unless the array is resized. The capacity of an array is distinct from its size, which refers to the number of elements currently stored in the array. Understanding the capacity is crucial for managing memory efficiently when working with arrays.
Loading...
Related Quiz
- Which entity has its own address space in memory: process or thread?
- What is the key difference between Type 1 and Type 2 hypervisors?
- ___________ allows objects of different classes to be treated as objects of a common superclass.
- The SQL ___________ statement is used to modify data in a database.
- The ___________ protocol is used to establish a connection-oriented communication between two hosts.