C/C++-এ বহুমাত্রিক অ্যারেকে সহজ শব্দে সংজ্ঞায়িত করা হয় অ্যারের অ্যারে হিসেবে। বহুমাত্রিক অ্যারেতে ডেটা ট্যাবুলার আকারে (সারি প্রধান ক্রমে) সংরক্ষণ করা হয়। নিম্নলিখিত চিত্রটি 3 x 3 x 3 মাত্রা সহ একটি বহুমাত্রিক অ্যারের জন্য মেমরি বরাদ্দকরণ কৌশল দেখায়।

অ্যালগরিদম
Begin Declare dimension of the array. Dynamic allocate 2D array a[][] using new. Fill the array with the elements. Print the array. Clear the memory by deleting it. End
উদাহরণ কোড
#include <iostream>
using namespace std;
int main() {
int B = 4;
int A = 5;
int** a = new int*[B];
for(int i = 0; i < B; ++i)
a[i] = new int[A];
for(int i = 0; i < B; ++i)
for(int j = 0; j < A; ++j)
a[i][j] = i;
for(int i = 0; i < B; ++i)
for(int j = 0; j < A; ++j)
cout << a[i][j] << "\n";
for(int i = 0; i < A; ++i)
delete [] a[i];
delete [] a;
return 0;
} আউটপুট
0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3