Abu Dawud Book 11, Hadith Number 2874.
Chapter : On giving sadaqah charity on behalf of a deceased.
Narated By Abu Hurairah : The Apostle of Allah (PBUH) said: When a man dies, his action discontinues from him except three things, namely, perpetual sadaqah (charity), or the knowledge by which benefit is acquired, or a pious child who prays for him.