answersLogoWhite

0

What is multidimensional arrays?

Updated: 8/10/2023
User Avatar

Wiki User

13y ago

Best Answer

A two-dimensional array is the simplest multi-dimensional array and is implemented as a one-dimensional array where every element is itself a one-dimensional array. We can imagine a two-dimensional array as being a table of rows and columns where every row is an array in its own right.

A three-dimensional array is simply a one-dimensional array of two-dimensional arrays, which can be imagined as being an array of tables. Extending the concept, a four-dimensional array is a table of tables.

Multi-dimensional arrays may be jagged. That is, a two-dimensional array may have rows of unequal length. Unlike regular arrays, jagged arrays cannot be allocated in contiguous memory. Instead, we use the outer array (the first dimension) to store pointers to the inner arrays. An array of strings (character arrays) is an example of a two-dimensional jagged array.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Multidimensional arrays can have more than one dimension, although more 2 or 3 arrays rarely used. They may consist of several rows and columns as well as multiple dimension.

Constructing Multidimensional Arrays

Multidimensional arrays, remember, are simply arrays of arrays. So a two-dimensional array of type int is really an object of type int array (int []), with each element in that array holding a reference to another int array. The second dimension holds the actual int primitives. The following code declares and constructs a two-dimensional array of type int:

int[][] myArray = new int[3][];

Notice that only the first brackets are given a size. That's acceptable in Java, since the JVM needs to know only the size of the object assigned to the variable myArray.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

more than one wooho this is a really hard question but i think it means more than one but recheck this anwer on another sight because i am not sure..

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

An array having arrays as elements.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is multidimensional arrays?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Does Java support multidimensional arrays?

Yes, Java supports multidimensional Arrays.Syntax isint[ ][ ] aryNumbers = new int[x][y];x represents number of rowsy represents number of columns


What is multidimensional array in c plus plus?

A multidimensional array in C or C++ is simply an array of arrays, or an array of an array of arrays, etc. for however many dimensions you want. int a; // not an array int a[10]; // ten int a's int a[10][20]; // twenty int a[10]'s, or 200 int a's int a[10][20][30]; // and so on and so forth...


How do you pass an array as a parameter?

AnswerUnfortunately your question is to broad. All progamming languages vary in the way things are done. I will just give a general way of doing it.You have to pass the multidimensional array into the function by including it with calling the function. On the receiving end you have to declare another multidimensional array so the information can be passed into it. Depending on the language, you may not be passing in a multidimensional array, instead that array may be stored in an object which you can pass instead.Hope this helps some.-Ashat-in C, when passing two dimensional arrays the compiler needs to know the width so it can calculate memory offsets.passing a 2d array of width 4:voidFunc(type array[][4]);


Explain how Multidimensional Arrays are used in a Visual Basic application?

Creating a Visual Basic Multidimensional Array Declaring a multidimensional array requires both the number of rows and columns to be defined when the array is created. As with standard arrays, multidimensional arrays are declared using the Dimkeyword: Dim strBooks(4, 2) As String The above Visual Basic code excerpt creates a two dimensional String array of 5 rows and 2 columns. Assigning Values to Multidimensional Array Values are assigned to array elements by specifying the index into each dimension. For example, in a two dimensional array, 0, 0 will references the element in the first column of the first row of the array. The following code initializes each element of our array: Dim strBooks(4, 1) As String strBooks (0, 0) = "Learning Visual Basic" strBooks (0, 1) = "John Smith" strBooks (1, 0) = "Visual Basic in 1 Week" strBooks (1, 1) = "Bill White" strBooks (2, 0) = "Everything about Visual Basic" strBooks (2, 1) = "Mary Green" strBooks (3, 0) = "Programming Made Easy" strBooks (3, 1) = "Mark Wilson" strBooks (4, 0) = "Visual Basic 101" strBooks (4, 1) = "Alan Woods" The above example creates a two dimensional array of 5 rows (remember that indexing starts at 0 so this array have elements from 0 to 4 inclusive) and two columns. Column 1 is the book title and column 2 the author.Answerer 1 Multidimensional arrays are used as follows:-Dim a(m,n) as integerfor putting valuefor i = 1 to mfor j = 1 to na(i , j) = val(inputbox("Enter the value"))s = s & a(i , j) & " "next js = s & vbcrlfnext i


How do you find the difference between two arrays in Java?

for arrays you can list the different arrays and what attributes that you give to them.

Related questions

Does Java support multidimensional arrays?

Yes, Java supports multidimensional Arrays.Syntax isint[ ][ ] aryNumbers = new int[x][y];x represents number of rowsy represents number of columns


What is multidimensional array in c plus plus?

A multidimensional array in C or C++ is simply an array of arrays, or an array of an array of arrays, etc. for however many dimensions you want. int a; // not an array int a[10]; // ten int a's int a[10][20]; // twenty int a[10]'s, or 200 int a's int a[10][20][30]; // and so on and so forth...


How do you use the word multidimensional in a sentence?

Multidimensional means having many dimensions. Here are some sentences.He has a multidimensional personality; he's a very complex person.The scientist made a device that allowed multidimensional travel.This is a multidimensional problem.


How do you pass an array as a parameter?

AnswerUnfortunately your question is to broad. All progamming languages vary in the way things are done. I will just give a general way of doing it.You have to pass the multidimensional array into the function by including it with calling the function. On the receiving end you have to declare another multidimensional array so the information can be passed into it. Depending on the language, you may not be passing in a multidimensional array, instead that array may be stored in an object which you can pass instead.Hope this helps some.-Ashat-in C, when passing two dimensional arrays the compiler needs to know the width so it can calculate memory offsets.passing a 2d array of width 4:voidFunc(type array[][4]);


What is multidimentional array?

Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.


What is a multidimentional array?

Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.


What is a PHP function that can sort arrays by other arrays?

You cannot sort arrays by other arrays; that wouldn't make sense, anyway.


Explain how Multidimensional Arrays are used in a Visual Basic application?

Creating a Visual Basic Multidimensional Array Declaring a multidimensional array requires both the number of rows and columns to be defined when the array is created. As with standard arrays, multidimensional arrays are declared using the Dimkeyword: Dim strBooks(4, 2) As String The above Visual Basic code excerpt creates a two dimensional String array of 5 rows and 2 columns. Assigning Values to Multidimensional Array Values are assigned to array elements by specifying the index into each dimension. For example, in a two dimensional array, 0, 0 will references the element in the first column of the first row of the array. The following code initializes each element of our array: Dim strBooks(4, 1) As String strBooks (0, 0) = "Learning Visual Basic" strBooks (0, 1) = "John Smith" strBooks (1, 0) = "Visual Basic in 1 Week" strBooks (1, 1) = "Bill White" strBooks (2, 0) = "Everything about Visual Basic" strBooks (2, 1) = "Mary Green" strBooks (3, 0) = "Programming Made Easy" strBooks (3, 1) = "Mark Wilson" strBooks (4, 0) = "Visual Basic 101" strBooks (4, 1) = "Alan Woods" The above example creates a two dimensional array of 5 rows (remember that indexing starts at 0 so this array have elements from 0 to 4 inclusive) and two columns. Column 1 is the book title and column 2 the author.Answerer 1 Multidimensional arrays are used as follows:-Dim a(m,n) as integerfor putting valuefor i = 1 to mfor j = 1 to na(i , j) = val(inputbox("Enter the value"))s = s & a(i , j) & " "next js = s & vbcrlfnext i


What do arrays eat?

Arrays are reported to be omnivoire.


An array of array can be created in java?

Yes. int[][] as; // this will define an array of arrays of integers Multidimensional arrays, remember, are simply arrays of arrays. So a two-dimensional array of type int is really an object of type int array (int []), with each element in that array holding a reference to another int array. The second dimension holds the actual int primitives. The following code declares and constructs a two-dimensional array of type int: int[][] myArray = new int[3][]; Notice that only the first brackets are given a size. That's acceptable in Java, since the JVM needs to know only the size of the object assigned to the variable myArray.


Janet learned to speak as a toddler. At the same time she grew taller. This is an example of how development is?

multidimensional. (apex)


Arrays whose size can be altered are known as?

Arrays whose size can be altered are known as dynamic arrays.