66 916
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #20106 in C# for Divya

Question #20106
In C#, what would the output of this program be?
using System;
class DeclareArraysSample {
public static void Main() {
byte[][] s = new byte[3][];
for (int i = 0; i < s.Length; i++) {
s[i] = new byte[i+4];
}
for (int i = 0; i < s.Length; i++) {
Console.Write("{0} - {1} ", i, s[i].Length);
}
}
}
Expert's answer
The output will be :
0 - 4 1 - 5 2 - 6

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions