Computer Science, asked by navya2292, 10 months ago

Difference between linear and multidimensional array

Answers

Answered by veer19782
0

Answer:

linear and multidimensional array

Answered by shilpa85475
0

A linear array (sometimes known as a one-dimensional array) is just a list of elements. It's a collection of variables with comparable data kinds. It allows for random access, and all elements may be found by their index. The array's size is predetermined. In C++, vector may be used to create a dynamically sized array.

Multidimensional arrays may be simply defined as an array of arrays in C/C++. Tables are used to store data in multidimensional arrays (in row-major order).

The general form of declaring N-dimensional arrays:

data_type  array_name[size1][size2]....[sizeN];

data_type: Type of data to be stored in the array.

          Here data_type is valid C/C++ data type

array_name: Name of the array

size1, size2,... ,sizeN: Sizes of the dimensions

Similar questions