On the convergence of an iterative method for the computation of generalized inverse and associated projections