Difficulty: Easy
Correct Answer: 1, 2, 5
Explanation:
Introduction / Context:
This conceptual question distinguishes rectangular arrays (int[ , ]) from jagged arrays (int[][]) and asks about memory layout intuition and access to the base class System.Array APIs. Some statements are distractors about method access and adjacency guarantees.
Given Data / Assumptions:
Concept / Approach:
Statement 1 is true by definition. For teaching purposes, statement 2 captures that a rectangular array is one contiguous rectangular block with rows laid out adjacently in the same object. Statement 5 correctly describes jagged arrays: each row is an independent inner array with potentially different lengths and nonadjacent addresses. Both kinds of arrays are instances derived from System.Array and thus inherit its methods; statements 3 and 4 are therefore false.
Step-by-Step Solution:
Verification / Alternative check:
Both forms expose Length, Rank (for rectangular), and methods like GetLength/GetUpperBound from System.Array.
Why Other Options Are Wrong:
Any option including 3 or 4 is incorrect because it denies System.Array membership inheritance.
Common Pitfalls:
Confusing the logical concept of adjacency in a rectangular array with physical memory guarantees, and thinking jagged arrays lose System.Array APIs.
Final Answer:
1, 2, 5
Discussion & Comments