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 the difference between abstract class and interface in c#?
What is check/uncheck?
How do I make a dll in c#?
What do you mean by casting a data type?
What is c# in asp net?
What is Implicit conversion in C#?
Can a sealed class be used as a base class?
Is double a decimal?
What is the wildcard character in sql?
Illustrate the differences between the system.array.copyto() and system.array.clone()?
Why do we parse in c#?
Name the method of servicebase class?
What is delegate in c#?
What is arraylist c#?
What is a console file?