Wipro interview question

Explain how would code transpose of a matrix using a programming language.