+1

Can I put an array in another array? if so , how can I access the elements of array in array.

11/6/2019 2:06:30 PM

Hima

2 Answers

New Answer

+3

arr[3] = {1,2,3}; // array arr[3][3] = {{1,2,3},{4,5,6},{7,8,9}}; // array inside an array. To access the element 3 you can give arr[0][2] or if you want to access 8 you can give arr[2][1].

+2

yes, solearn has a multidimensional array section for C: https://www.sololearn.com/learn/C/2932/ but if u want to hear it from me, then int arr[2][2] = { {1,2} {3,4} }; // changes the 3 to a 2 arr [1][0] = 2;