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 can you register a custom server control to a web page?
What are the different types of sessions in asp.net?
Can you set which type of comparison you want to perform by the comparevalidator control?
What is asp.net version?
Explain http handlers? Where we can use the http handlers?
What is the difference between a candidate key and primary key?
How can we make sure that Web API returns JSON data only?
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
How to disable validator control by client side JavaScript?
What is difference between singleton and single call?
What is the main differences between asp and asp.net?
How to create events for a control?
Contrast OOP and SOA. What are tenets of each ?
Can I combine classic asp and asp.net pages?
What are the differences between the response.write() and response.output.write()?