Advertisements
Advertisements
प्रश्न
Identify the true statement.
पर्याय
In an array, all elements have same data type.
In a class, all members have same data type.
In an array, all elements have different data type.
In a class, all members have same value.
MCQ
Advertisements
उत्तर
In an array, all elements have same data type.
Explanation:
- An array is a collection of elements of the same data type stored in consecutive memory locations. It is used to store multiple values under a single variable name.
- Since all elements belong to the same type, the compiler knows how much memory to allocate for each element.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Class as the Basis of all Computation - Exercises [पृष्ठ ६४]
