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
What are the features that make asp.net more used framework? : asp.net mvc
What are the disadvantages of view state?
What are the asp.net list controls and difference between them?
Is asp.net is a programming language?
What are the Types of session management in ASP.NET
Tell me the code snippet to show how we can return 404 errors from HttpError?
Describe the master page.
Explain the asp.net session state modes.
What are the different types of validation controls in asp.net?
What is _dopostback in asp net?
What are the benefits of Razor View?
What is asp.net globalization?
Differentiate between globalization and localization.
How we implement web farm and web garden concept in asp.net?
Explain how cookies work.