Hi @jeathree
I think you can use the get_permalink() function like this:
echo get_permalink( $the_post->ID );
There are a lot of functions which you can use to get more information from a post by passing the ID. Please take a look at the Codex to learn more about them.
I hope this helps 🙂