Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to transpose rows into columns and columns into rows in
a multi-dimensional array?

Answer Posted / venugopal

//Here 'i' indicates for 'i'th row and 'j' indicates
for 'j'th row
//Thus, the matrix is iXj with 3X2 size
//The result matrix should be 2X3

//The logic is as fallows

for(int j=0;j<2;J++)
{
for(int i=0;i<3;i++)
console.write(a[j,i]);
//After completing the first row it should be in the
next line
console.writeln("\n");
}

The final out put should be

2 1 3
2 2 4

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain code compilation in c#.

959


Is namespace a class?

878


What are callback methods in c#?

923


What is desktop example?

913


What is the difference between “finalize” and “finally” methods in c#?

911


Can a private virtual method can be overridden?

980


Explain about Serialize and MarshalByRef?

955


Is it possible to have different access modifiers on the get/set methods of a property?

1020


What is the difference between static class and sealed class in c#?

924


What are primitive types in c#?

973


what are nullable types in c#

1031


What all details the assembly manifest will contain?

825


How will you deploy the dll file in gac?

936


What is difference between destructor and finalize?

919


Can class be protected in c#?

918