answersLogoWhite

0

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...

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you find matrix in c?

using multidimensional array


How do you create a 2 multidimensional array of size 22 in C programming?

int x[22][22];


What is the lowest subscript of an array in c plus plus?

The lowest subscript of an array in C, or C++ is 0.


Making multiplication table in c plus plus using do while loop?

Um, not sure how to do that, but you can create a sort of "table" in C++ by using multidimensional arrays. Below is an example of how to create a two-dimensional array: int myArray[10] [10]; You can add more dimensions to the array in order to increase its storage capacity.


How do you declare a string array and add elements to it in C plus plus?

You cannot add elements to a fixed array in C or C++. If, however, the array is declared as a pointer to an array, you can add elements by allocating a new array, copying/adding elements as needed, reassigning the new array to the pointer, and deallocating the original array.


A c plus plus code to make a multidimensional array that can store strings?

int myarray=[5][5]; This snippet of code creates a 5X5 two-dimensional array. You can declare an array with more dimensions, but you shouldn't really need to go above more than four dimensions. Four-dimensional arrays are only used by high-end graphics programs or programs that need to calculate a ton of data.


Array implementation of priority queue example program in c plus plus?

yes


How do you initialise a two dimentional array?

C provides rectangular multidimensional arrays. In C, a two-dimensional array is really a one-dimensional array, each of whose elements is an array. An array is initialized by a list of initializations in braces; each row of a two-dimensional array is initialized by a corresponding sub-list. Example of two dimensional array initialization: char array_example[2][4] = { {11, 12, 13, 14}, {21, 22, 23, 24} };


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


How can you dicribe array?

An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.


Is it possibly to return an array of strings in a function without using pointers in C plus plus?

No.


Can you help me with the C plus plus code of the program which has 10 index of array it adds 5 into every even elements of the array and then it subtracts 10 into the odd elements of the array?

int array[10] = {...}; for (int i = 0; i < 10; ++i) { if (i % 2 == 0) array[i] += 5; else array[i] -= 10; }