Cognizant interview question

A program to transpose a matrix