+ 1

Segmentation fault c++

This code is giving a segmentation fault but I can't figure out why I am getting the error. How can I fix it? https://code.sololearn.com/ca196a20a152

23rd Apr 2021, 2:29 PM
Gajendra Sonare
Gajendra Sonare - avatar
3 Réponses
+ 1
At line 16: the loop goes from 1 to n. Think about what happens when i=n
25th Apr 2021, 8:07 AM
John Doe