C# Programming - Arrays - Discussion
Discussion Forum : Arrays - General Questions (Q.No. 5)
5.
How will you complete the foreach loop in the C#.NET code snippet given below such that it correctly prints all elements of the array a?
int[][]a = new int[2][];
a[0] = new int[4]{6, 1 ,4, 3};
a[1] = new int[3]{9, 2, 7};
foreach (int[ ] i in a)
{
/* Add loop here */
Console.Write(j + " ");
Console.WriteLine();
}
Discussion:
2 comments Page 1 of 1.
Anomie said:
7 months ago
Anyone, Please explain.
Tony said:
8 years ago
Please, can anyone explain me?
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers