Spectral analysis of random sparse matrices