❝The deceased has all types of good deeds reach him.❞
— Imam Ahmad b. Hanbal (r)
[Kitab al-Wuquf, 92]
This includes Qur’an recitation, sadaqah, and all other good deeds one intends to pass on to the deceased. There is a reward in it for the one doing the good deed, but is it exactly the same reward as if he had done it for himself? Allah knows best, but Imam al-Buhuti (r) says regarding that: “Allah’s bounty is vast.”
One may do the same for someone who is alive.
For further reference please refer to Kashhaf al-Qina’ and al-Mughni.