Question: Write the appropriate statement to display the value 24 from the given array? d) Consider the following code snippet: int[][] arr = { { 11,
Write the appropriate statement to display the value 24 from the given array?
d) Consider the following code snippet:
int[][] arr =
{
{ 11, 22, 33 },
{ 44, 55, 66 }
};
int val = arr[0][0] + arr[1][2];
System.out.println(val);
What is the output of the given code snippet on execution?
e) Consider we a have the following two dimensional array
{ 1, 2, 3, 0 }
{ 4, 5, 6, 0 }
{ 0, 0, 0, 0 }
Write a code snippet to print the sum of the highlighted color numbers.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
