I wrote this function to reverse a string in C, but when switching characters in the string the program crashes. I have no idea what\'s causing it, so any help would be apprecia
You need to take character pointer as a parameter in your function:
Void reverse (char *ptr) { // ... }
And perform operation on pointer.