Transpose of Array Matrix in C language:- Q)Write a program to enter matrix and print the transpose of matrix . Note:-You can also...
Transpose of Array Matrix in C language:-
Note:-You can also create this program in c++(c plus plus),java,c#(c sharp) languages with the same logic.
void main()
{
int matrix[10][20],i,j,row,col;
clrscr();
printf("Enter row and column");
scanf("%d%d",&row,&col);
for(i=0;i<row;i++)
{
for(j=0;j<col;j++)
{
scanf("%d",&matrix[i][j]);
}
}
printf("Transpose of Matrix is");
for(j=0;j<col;j++)
{
for(i=0;i<row;i++)
{
printf("%d",&matrix[i][j]);
}
printf("/n");
}
getch();
}
If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.
COMMENTS