0
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
2 Antworten
+ 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)
+ 2
You can put array elemnts into a vector and then use for_each