Transfer shares to a friend's demat account

Suppose I have some shares in my demat account which I want to transfer to a friend’s demat account. Is it possible to do this without involving the exchanges? Or do I need to sell my shares and ask my friend to buy? Is there any way to ensure that my friend gets the same shares that I am selling at the same price?

@anurag_kumar : very simple. you can do so using a DIS in an off market mode. you must have been provided with a DIS book let like a cheque book when you opened the demat account.