generated square matrix in c