Direct stress and elongation

A prismatic bar AB of length L, cross-sectional area A ,modulus of elasticity E ,and weight W hangs vertically under its own weight
a>derive a formula for the downward displacement d(c) of point C which is located at a distance l from the lower end of the bar

how do we get it?

Thanks for any hints or answers!