Wipro Interview Question

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