Netcracker Technology interview question

write a program to transpose a matrix