A

Admin • 828.03K Points
Coach

Q. What will be the output of the code?

Code:
int[] arr = {1, 2, 3};
Console.WriteLine(arr.Length);
  • (A) 2
  • (B) 3
  • (C) 4
  • (D) Runtime error

Explanation by: Admin
Length returns the total number of elements in the array.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.