consider the array:
char str[] = "asd\n";
when you reverse it, the resulting string is: "\ndsa", thus it gets move to a new line