A

Admin • 828.03K Points
Coach

Q. Which array declaration is valid?

  • (A) int arr[] = new int();
  • (B) int arr[] = new int[5];
  • (C) int arr = new int[5];
  • (D) int[] arr = int[5];

Explanation by: Admin
Option B is valid: it allocates an array of size 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.