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 ?



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

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

More ASP.NET Interview Questions

What is the need of client side and server side validation ?

1 Answers   Keane India Ltd,


I have a method written in WebForm (means .aspx page) & now I want to call this method in WebUserControl (means .ascx page) what should I have to do?

0 Answers   Patni,


State management in asp.net ?

8 Answers   Accenture,


Define cookie.

0 Answers  


Explain a program using razor view engine to create a simple application? : asp.net mvc

0 Answers  


Is it possible to change the index of primary key on table?

0 Answers  


What is difference between response.redirect and server.transfer ?

2 Answers   Kalinga Software, Satyam,


Which is faster viewdata or viewbag?

0 Answers  


What is difference between View State and Hidden Field in ASP.NET?

0 Answers  


what are partial classes and their use?

3 Answers   Microsoft,


What is cas?

0 Answers  


What is state management react?

0 Answers  


Categories