How to transpose rows into columns and columns into rows in
a multi-dimensional array?
Answer Posted / raji
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 ? | 20 Yes | 7 No |
Post New Answer View All Answers
What is difference between gridview and form view?
What is boxing in c#?
How can I develop an application that automatically updates itself from the web?
List down the commonly used types of exceptions in .net
What is xamarin used for?
What is the process of delegation?
What are the different types of delegation?
What is session c#?
What is the use of GC.KeepAlive Method?
Can main method be final?
What is null propagation c#?
What is void method?
What is xpath in c#?
What are All kind of access specifiers for a class and for methods
What does it mean to override a method?