This function is reversing the the order of chars in a given string. Its called by inputing its start and end pointers. for example the function called like so
reverse(str, str + strlen(str));
I don't understand why the while condition works, or more precisely what are we comparing by (start<--end)
.
void reverse(char* start, char* end)
{
while (start < --end)
swap(start++, end);
}