Explanation:
The correct answer is: (A) Jagged Array
Explanation:
In C language, array dimensions and sizes must be known at compile time for static allocation.
Letβs look at the options:
(A) Jagged Array β β Not possible statically
- A jagged array (also known as an "array of arrays" where each sub-array can have different lengths) is not possible statically in C.
- C supports arrays of pointers to achieve jagged arrays dynamically, but you cannot declare a jagged array statically since each row would need to have a different size, and static arrays in C require fixed dimensions.
Example (dynamic jagged array):
int *arr[3];
arr[0] = malloc(2 * sizeof(int)); // 2 elements
arr[1] = malloc(4 * sizeof(int)); // 4 elements
arr[2] = malloc(3 * sizeof(int)); // 3 elements
(B) Rectangular Array β β Possible statically
- A typical 2D array with the same number of columns in each row.
int arr[3][4]; // 3 rows, 4 columns
(C) Cuboidal Array β β Possible statically
- A 3D array (same size for all dimensions).
int arr[3][4][5]; // 3 layers of 4x5
(D) Multidimensional Array β β Possible statically
- General term for arrays with 2 or more dimensions.
- C supports statically declared multidimensional arrays:
int arr[2][3][4]; // 3D
Final Answer: (A) Jagged Array