I found this code..
It works just fine.
but I really dont know how can it reverse the string?
shouldnt it end at the middle of the string? (target < e)
and what char tmp does?
LuigiCode:void rev(char* target) { for(char* e = target+length(target)-1; target < e; ++target, --e) //length is the same as strlen. { char tmp = *target; *target = *e; *e = tmp; } }