Here Is the link for the similar query.
Analyse the solution thoroughly and then try this one on your own.
For remaining queries, we request you to post them in separate threads
Hope this information will clear your doubts about topic.
If you have any more doubts just ask here on the forum and our experts will try to help you out as soon as possible.