Hi I'm new here and I would like some help because my code produces a run time error.
My problem is I'm going to create a function called reverse_string of type void with a char pointer as an argument called str.
My program compiles fine. Any feedback would be helpful. Thank you
Code:void reverse_string(char *str) { int ctr = 0, tctr = 0; char temp; while(str[tctr] != '\0'){ tctr++; } while(ctr < tctr) { temp = str[ctr]; // swap characters str[ctr] = str[tctr - 1]; str[tctr - 1] = temp; ctr++; tctr--; } }