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

Where you store Connection string in "Web.Config" file in ASP.NET?

1109


What are the types of validation in asp net?

1088


Web API supports which protocol?

1424


Can you use Web API with ASP.NET Web Form?

1203


Is asp.net a programming language?

1075


how can we create wcf in asp.net and how can we cll that in to asp.net application?plsss tel me each step clearly

2116


What is the difference between server-side scripting and client-side scripting?

1050


What is the difference between system.stringbuilder and system.string

836


What is viewstate in asp net with example?

1029


How Can assign alias name for ASP.NET Web API Action?

1515


Describe the events in the life cycle of a web application.

1160


Explain repository pattern in asp.net mvc? : asp.net mvc

1085


What is meant by web application?

992


How to find out what version of asp.net I am using on my machine?

1137


Explain the use of errorprovider control in .net?

1009