GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

multidimensional arrays

daniela rodriguez Spanisch

Inhalt der Mindmap

multidimensional arrays

  1. Data in multidimensional arrays are stored in tabular form (in row major order).

  2. data_type[1st dimension][2nd dimension][]..[Nth dimension] array_name = new data_type[size1][size2]….[sizeN];

    • data_type: Type of data to be stored in the array. For example: int, char, etc. dimension: The dimension of the array created. For example: 1D, 2D, etc. array_name: Name of the array size1, size2, …, sizeN: Sizes of the dimensions respectively.
  3. Size of multidimensional arrays: The total number of elements that can be stored in a multidimensional array can be calculated by multiplying the size of all the dimensions.

  4. A two – dimensional array can be seen as an array of one – dimensional array for easier understanding.

    • A three – dimensional array can be seen as an array of two – dimensional array for easier understanding.
  5. Declaration – Syntax: data_type[][] array_name = new data_type[x][y]; For example: int[][] arr = new int[10][20];

    • Initialization – Syntax: array_name[row_index][column_index] = value; For example: arr[0][0] = 1;
  6. Elements in two-dimensional arrays are commonly referred by x[i][j] where ‘i’ is the row number and ‘j’ is the column number.

    • Elements in three-dimensional arrays are commonly referred by x[i][j][k] where ‘i’ is the array number, ‘j’ is the row number and ‘k’ is the column number.
  7. Declaration – Syntax: data_type[][][] array_name = new data_type[x][y][z]; For example: int[][][] arr = new int[10][20][30];

    • Initialization – Syntax: array_name[array_index][row_index][column_index] = value; For example: arr[0][0][0] = 1;
  8. A three – dimensional array can be seen as a tables of arrays with ‘x’ rows and ‘y’ columns where the row number ranges from 0 to (x-1) and column number ranges from 0 to (y-1)

Informationen

Beschreibung
Mindmap am multidimensional arrays, erstellt von daniela rodriguez am 15/05/2019.
Erstellt von
daniela rodriguez
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck