How to transpose rows into columns and columns into rows in
a multi-dimensional array?
Answer Posted / venugopal
//Here 'i' indicates for 'i'th row and 'j' indicates
for 'j'th row
//Thus, the matrix is iXj with 3X2 size
//The result matrix should be 2X3
//The logic is as fallows
for(int j=0;j<2;J++)
{
for(int i=0;i<3;i++)
console.write(a[j,i]);
//After completing the first row it should be in the
next line
console.writeln("\n");
}
The final out put should be
2 1 3
2 2 4
Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
For methods inside the interface why can’t you specify the accessibility modifier?
Please explain value types and reference types used in c#?
Does constructor return any value in c#?
Is string mutable in c#?
Difference between Value type & reference types ? and give the example in .Net?
What is mvc in c#?
What is the advantage of dependency injection?
List the 5 different access modifiers in c#?
What is type checking in c#?
What is form feed and carriage return?
What is dictionary class in c#?
Explain the accessibility modifier protected internal?
What is the symbol used for in c#?
How do I develop c# apps?
What are the fundamental principles of oo programming?