At the end of the code, p2 points to NULL character (as while loop increments p2 and runs till *p2 == 0). As soon as p2 points to NULL , while loop exits.
So while printing it prints NULL string.
The s2 pointer should reach its original address.
You should substract the number of locations incremented.
After substracting you get what you desired.