printing arrays in c++

hi guys i am new to coding i was finding ways to print an array is there any other way than just using a loop

10th Jun 2021, 6:05 AM
2 Answers
+ 2
The easy way is to use loop. You can write a custom function for printing array using recursion to avoid loop, but other than for learning purposes, I just don't see any benefit (or necessity) to use recursion, nor problem using a loop to display arrays' content. https://code.sololearn.com/cx49txedMoxp/?ref=app (Edited)
10th Jun 2021, 8:03 AM
+ 2
You can put array elemnts into a vector and then use for_each
10th Jun 2021, 8:51 AM
GHOST mHBr - avatar