lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 20
What is the output of the following code fragment?
int count = 0; string[][] array = new string[][] { new string[] {"γ"}, new string[] {"α","ß","γ","δ"}, new string[] {"α","γ"} }; foreach (string[] element in array) { count += element.Length; } Console.Write(count);
A. 6
B. 7
C. 9
D. 8
Links:
Jagged Arrays
Using foreach with Arrays
Array.Length Property