How will you initialize a 2-d array?

1 answer

Answer

1274218

2026-04-18 06:40

+ Follow

All arrays are one-dimensional. A two-dimensional array is simply a one-dimensional array of one-dimensional arrays:

int a[2][3];

This is an array of 2 elements where each element is itself an array of 3 integers. In other Words it is an array of 6 integers. The two dimensions simply allow us to split the array into two sub-arrays of 3 elements each.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.