Shared variable for master and slave

In reply to Er. Shipra:

Which way did you try it? Please share your code.