How to transpose rows into columns and columns into rows in
a multi-dimensional array ?
Answer / 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 |
What is session management in web application?
How can we access static variable?
How to merge 2 tables fields in DataTable in asp.net
can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?
what do machine key element in configuration file specify?
What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
What are validator? How do you disable them?
What is the difference between rest and restful?
Can we use http handlers to upload a file in asp.net?
What are asp.net web forms?
Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?
What's the use of formatters in .net?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)