If on expiry day, I buy an option on intraday basis; but could not sell it. How will it get processed, will it get exercised for delivery or just get squared off?

If on expiry day, I buy an option on intraday basis; but could not sell it. How will it get processed, will it get exercised for delivery or just get squared off ?