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 session management in web application?

0 Answers  


How can we access static variable?

0 Answers  


How to merge 2 tables fields in DataTable in asp.net

6 Answers   Wipro,


can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?

0 Answers  


what do machine key element in configuration file specify?

1 Answers   TCS,


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

0 Answers  


What are validator? How do you disable them?

0 Answers  


What is the difference between rest and restful?

0 Answers  


Can we use http handlers to upload a file in asp.net?

2 Answers  


What are asp.net web forms?

0 Answers  


Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

0 Answers   Siebel,


What's the use of formatters in .net?

0 Answers  


Categories