Cognizant Interview Question

A program to transpose a matrix