Pergunta de entrevista da empresa Cognizant

Please write an algoritm for building a spiral matrix using a 2D array in C.