How to print value using 2D array with for loop, give me an example with program. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to print value using 2D array with for loop, give me an example with program.

1st Oct 2019, 7:03 PM
Balaji
Balaji - avatar
3 Answers
+ 1
Just iterate over all the arrays inside
1st Oct 2019, 7:05 PM
Airree
Airree - avatar
0
Use a nested for-loop. The outer loop going through the 1st dimension of the array and the inner loop going through the 2nd dimension.
1st Oct 2019, 7:12 PM
Cluck'n'Coder
Cluck'n'Coder - avatar
0
Example is hard to give not knowing the language (and not seeing any attempt)
1st Oct 2019, 8:53 PM
ChrA
ChrA - avatar