0

outputs array

How to outputs an array without using any loops?? example.. int arr[10] = {1,2,3,4,5,6,7,8,9,10}; cout << all array's indexes..; any ideas??

17th Dec 2016, 11:44 AM
Fluffy Rabbit
Fluffy Rabbit - avatar
2 Respostas
0
If + Goto. Recursive functions. Writing all the outputs manually. Idk
17th Dec 2016, 12:30 PM
Sheemin
Sheemin - avatar
0
why do you want to do it without a loop?Anyway: cout<<arr[0]<<", "<<arr[1]<<…<<arr[9]<<endl;
17th Dec 2016, 1:13 PM
Fanis Spirou
Fanis Spirou - avatar