0
Fix the error (segmentation fault)
I'm trying to reverse the string with this code . https://code.sololearn.com/cPypx4wbt196/?ref=app
1 ответ
+ 1
"computer" is a read only string so you cannot modify it.
Either use an array, or allocate a string on the heap with malloc.
Also, pass the size of the string as a second parameter, don't hardcode the 8.
And you're also reversing the string twice.