+1

Printing array element of 2d

https://www.sololearn.com/learn/C/2932/ I can't understand why we use a[1][2] to print third element in 2 row??? Why can't we use a[2][3] instead of it????plss explain it....

10/10/2019 6:44:51 AM

Surya Bhai

3 Answers

New Answer

+4

Array indexing is zero based in C and many programming languages i.e 1st element is at index 0 arr[0] is first element for 1D array for 2D array arr[0][X] is first row arr[1][X] is second row arr[0][0] is first element in 1st row Now you should be able to understand this.

0

Can you please answer this

0

~swim~ thanks for your help