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
How to unit test Web API?
What is the use of express session?
What is custom attribute? How to create?
How to implement Authentication and Authorization?
What is the difference between the get method () and post method ()?
Explain about Application and Session Events ?
Explain the advantages of caching?
what are the Custom controls in asp.net?
Is it true that a Web service must be written in .NET or not?
a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?
Does web services support data reader like pom project?
What does passport and windows authentication mean in ASP.NET?
How do you change the session time-out value?
Can you change a Master Page dynamically at runtime?
What is enableviewstate?