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 / kalpana

int [,]array=new int[2,2] {{1,2},{3,4}};

transpose of the array is

for(int i=0;i<2;i++)
{
for(int j=0;j<2;j++)
{
Console.Write("{0} ",a[j,i]);
}
}

o/p : 1 3
2 4

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to unit test Web API?

1157


What is the use of express session?

914


What is custom attribute? How to create?

1021


How to implement Authentication and Authorization?

1009


What is the difference between the get method () and post method ()?

930


Explain about Application and Session Events ?

1006


Explain the advantages of caching?

938


what are the Custom controls in asp.net?

994


Is it true that a Web service must be written in .NET or not?

1036


a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?

1996


Does web services support data reader like pom project?

874


What does passport and windows authentication mean in ASP.NET?

1127


How do you change the session time-out value?

987


Can you change a Master Page dynamically at runtime?

925


What is enableviewstate?

905