int X[2] [4] = { 1, 2, 3, 4, 5, 6, 7, 8};5 will be the value of and how a. X[0 ][ 1]. b. X[0 ][ 5]. c. X[1 ][ 5]. d. X[1][0] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

int X[2] [4] = { 1, 2, 3, 4, 5, 6, 7, 8};5 will be the value of and how a. X[0 ][ 1]. b. X[0 ][ 5]. c. X[1 ][ 5]. d. X[1][0]

How exactly are the elements stored in the 2 dimensional array in c or c++

18th Jan 2020, 5:18 AM
kaushik agrawal
kaushik agrawal - avatar
2 Answers
+ 2
2 rows and 4 columns 1 2 3 4 5 6 7 8 So element at X[1][0] is 5. It means row 1 and column 0.
18th Jan 2020, 6:35 AM
Avinesh
Avinesh - avatar
+ 1
Please avoid writing your question into the tags - "how elements stored in the 2 dimensional arrays" Instead, indicate a related programming language in tags. You can opt to swap your Description with your question title. For future reference, please follow this guide to posting a question https://www.sololearn.com/Discuss/333866/?ref=app
18th Jan 2020, 6:59 AM
Ipang