+ 1

How to reverse an array in c++?

Hi everyone!! How can I reverse an array in c++ I tried different tutorials but couldn't understand them

26th May 2019, 10:10 AM
Sudais Ahmad
Sudais Ahmad - avatar
3 ответов
+ 2
to reverse and array, you can just use a loop, then iterate from the last index to the first index which is zero
26th May 2019, 10:15 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
To actually reverse it, i made a simple demo: https://code.sololearn.com/cJ3oKToomac3/?ref=app
26th May 2019, 10:47 AM
Airree
Airree - avatar
+ 1
alright found the answer... it was easy 😅 https://code.sololearn.com/cFU1wt0It21r/?ref=app
27th May 2019, 12:26 AM
Sudais Ahmad
Sudais Ahmad - avatar