English

Identify the true statement. (a) In an array, all elements have same data type (b) In a class, all members have same data type (c) In an array, all elements have different data type

Advertisements
Advertisements

Question

Identify the true statement.

Options

  • 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

Solution

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
  Is there an error in this question or solution?
Chapter 2: Class as the Basis of all Computation - Exercises [Page 64]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 2 Class as the Basis of all Computation
Exercises | Q 1. (ix) | Page 64
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×