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

What are the features that make asp.net more used framework? : asp.net mvc

1021


What are the disadvantages of view state?

1115


What are the asp.net list controls and difference between them?

1031


Is asp.net is a programming language?

951


What are the Types of session management in ASP.NET

1045


Tell me the code snippet to show how we can return 404 errors from HttpError?

1286


Describe the master page.

963


Explain the asp.net session state modes.

1077


What are the different types of validation controls in asp.net?

1057


What is _dopostback in asp net?

969


What are the benefits of Razor View?

950


What is asp.net globalization?

985


Differentiate between globalization and localization.

995


How we implement web farm and web garden concept in asp.net?

1007


Explain how cookies work.

1059