C programming
C programming

Transpose of matrix in 2d Array

Transpose of matrix in 2d Array

C programming

Transpose of matrix in 2d Array

 

Q. Write a program to print the transpose of the matrix entered by the user.

#include<stdio.h>

int main()

{

int r ;

printf(“Enter number of rows :Β  “);

scanf(“%d”, & r);

int c ;

printf(“Enter number of columns :Β  “);

scanf(“%d”, & c);

printf(“Enter all elements of matrix\n”);

int arr[r][c];

for(int i=0 ; i<r ; i++){

for(int j=0 ; j<c ; j++){

scanf(“%d”, & arr[i][j]);

}

}

printf(“\n);

for(int i=0 ; i<c ; i++){

for(int j=0 ; j<r ; j++){

printf(“%d”, & arr[j][i]);

}

printf(“\n”);

}

return 0;

}

 


 

Topics Covered :

  • transpose matrix in c
  • transpose matrix program
  • print transpose matrix in c
  • print transpose matrix using 2d array in c
  • how to print transpose of a matrix in c
  • program on matrix in c
  • c program to print transpose matrix

 


 

 


 

Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.

Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.

 

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’»Β Social MediaΒ LinksΒ ofΒ Tech DCodeΒ :

πŸ‘‰πŸ»Β YouTube :Β https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
πŸ‘‰πŸ»Β Instagram :Β https://www.instagram.com/thetechdcode/
πŸ‘‰πŸ»Β Facebook Page :Β https://www.facebook.com/thetechdcode
πŸ‘‰πŸ»Β Twitter :Β https://twitter.com/thetechdcode
πŸ‘‰πŸ»Β Telegram Channel :Β https://t.me/thetechdcode
πŸ‘‰πŸ»Β Tech DCode Linktree :Β https://linktr.ee/thetechdcode
πŸ‘‰πŸ»Β My Personal Handles :Β https://linktr.ee/virtualshivamin

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’»Β Social Media LinksΒ ofΒ SHIVAM SINGHΒ (OWNER) :

πŸ‘‰πŸ»Β Instagram :Β https://www.instagram.com/virtualshivamin/
πŸ‘‰πŸ»Β Facebook Page :Β https://www.facebook.com/virtualshivamin/
πŸ‘‰πŸ»Β Twitter :Β https://twitter.com/virtualshivamin/
πŸ‘‰πŸ»Β Personal Linktree :Β https://linktr.ee/virtualshivaminΒ 

Leave a Reply

Your email address will not be published. Required fields are marked *