user421287
user421287

Reputation: 21

Multidimensional array

How to get stored the value entered by user in multidimensional array

Upvotes: 2

Views: 782

Answers (1)

linuxuser27
linuxuser27

Reputation: 7353

I assume this is C.

int arr[2][2] = {{1,2}, {3,4}};
int m01 = arr[0][1];
printf("%d\n", m01);

The above output will be 2.

It is important also to not confuse int ** with int [][]. They are very much different.

Upvotes: 3

Related Questions