Yes, you can buy and sell stocks across the exchanges. This is facilitated by interoperability among clearing corporations of different exchanges. This means that trades made on any exchange can be settled through a single clearing corporation.

Let's say you buy ITC on BSE for Rs.200. You can sell it on NSE at Rs.202 for a profit of Rs.2. 

You can read more about it in this SEBI circular or refer this document from BSE.