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

What is an escape sequence? Name some string escape sequences in c#.

928


When is a class declared as a class abstract?

997


What is data bind in c#?

923


What is a Command Object in C#?

1039


Ho we can see assembly information?

966


Explain the use of Mutex in C#?

1019


Give some examples of commonly used i/o classes?

922


What is serialization in dot net?

958


Do extension methods have to be static?

1031


How does foreach loop work in c#?

982


Is is possible to force garbage collector to run?

1001


What are some examples of desktop applications?

935


What is the difference between early binding and late binding in c#?

963


What is Implicit conversion in C#?

1128


Why do we need to call CG.SupressFinalize?

995