add friend function example

Signed-off-by: Sandeep Patil <psandeep.s@gmail.com>