STUDENTS 3K

  • Home
  • Students+
    • Engineering Students
    • Education Loan
    • Study Abroad Guide
    • Projects Download
  • Freshers
    • Aptitude Q & A
    • Placement Papers
    • Verbal Ability
    • Interview Questions
    • IT Company Details
    • Job Updates
  • Study Resources
    • Career Guidance
    • LAB Programs
      • C Programs
      • CPP Programs [C++]
      • Java Programs
    • Question Papers
    • Learn English
    • Notice Board
  • More –>>
    • Love calculator
You are here: Home / Important Programs / C program for Transpose of Matrix

C program for Transpose of Matrix

C program for Transpose of Matrix: The source code of this program provides you an interchangeable matrix output. Transpose matrix means, interchanging rows and columns of a particular matrix at the time of execution. This C program consists of an example code with explanation also. An example program is given at the bottom. Before going to this topic, just check the Matrix addition and the Matrix multiplication programs also.

  • Merge sort in C programming example with explanation

TRANSPOSE A MATRIX IN C

This code is based on arrays concept. And this C program is used to change the dimensions of a matrix by changing the row and Column of matrix format. For example, given input matrix format is

2  4

7  9

5  8

after transpose of dimension is

2  7  5

4  9  8

  • C program for Factorial, Prime numbers, Armstrong, Strong & Palindrome or not

Transpose matrix program:

Q: Write a program to find the transpose of given matrix in C using arrays.

/*
Header files section
© http://students3k.com
*/
#include<stdio.h>
#include<conio.h>
void main()
{
//Program variables
int m1[40][40],m2[40][40],j,i,temp,nu,nu1,nu2,nu3;
clrscr();//Function to clear previous function
printf("Enter the dimension of matrix");//Display function
scanf("%d%d",&n,&n1);//Getting input function
printf("\enter the matrix dimension format");
for(i=0;i<n;i++)//Looping statement
{
for(j=0;j<n1;j++)//Nested for loop
{
scanf("%d",&m1[i][j]);
// © http://students3k.com
}
}
printf("\n\n the matrix format is :");
for(i=0;i<nu;i++)
{
printf("\n");
for(j=0;j<nu1;j++)
{
printf("%d\t",m1[i][j]);
}
}
printf("\n");
printf("\n The transpose the dimension of matrix is");
for(i=0;i<nu;i++)
{
printf("\n");
for(j=0;j<nu1;j++)
{
printf("%d\t",m1[j][i]);
}
}
getch();
}

Filed Under: Important Programs Tagged With: C, LAB, Programs





Random Materials :

  • Data Mining and Data Warehousing
  • Difference Between Class and Primitive Types
  • Database Roles in SQL
  • CASE Expression in SQL
  • Concurrent Update Problem

Follow Us on Facebook

Advertisement

Company Profile

  • About Students3k
  • Contact Us
  • Earn Money Online
  • Website Archive Page
  • Privacy Policy
  • Disclaimer

Categories

  • Important Programs
  • Study Abroad
  • IT Companies
  • Career Guidance for Students
  • Teachers
  • Verbal Analogies

We Are Social

  • Facebook Fans
  • Twitter Follow
  • Google Plus
  • Pinterest Page

© Copyright 2012 - 2016 Students3k.com · All Rights Reserved · Designed By Benefits

Show