$getchar()$ - reads a single character at a time from the $stdin$.
$putchar(c)$ - writes a character specified by the argument to $stdout$.
As $getchar()$ and $putchar()$ both are needed to read the string and print its reverse and only option D contains both the function. D is the answer. :P
Now coming to the code.
$wrt\_it (void)$ is calling itself recursively. when \n is encountered $putchar()$ gets executed and prints the last character and then the function returns to its previous call and prints last 2nd character and so on.