Asked on 30 Jun 2019
You must hold the stock the date before the ex-dividend date to be entitled to the dividend. So yes, you will be entitled.
Yup you will still be entitled if you buy before the ex dividend date and hold till the ex dividend date.
You can sell on or after the ex dividend date and still entitled to the dividends.
30 Jun 2019