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
Where you store Connection string in "Web.Config" file in ASP.NET?
What are the types of validation in asp net?
Web API supports which protocol?
Can you use Web API with ASP.NET Web Form?
Is asp.net a programming language?
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
What is the difference between server-side scripting and client-side scripting?
What is the difference between system.stringbuilder and system.string
What is viewstate in asp net with example?
How Can assign alias name for ASP.NET Web API Action?
Describe the events in the life cycle of a web application.
Explain repository pattern in asp.net mvc? : asp.net mvc
What is meant by web application?
How to find out what version of asp.net I am using on my machine?
Explain the use of errorprovider control in .net?