Consider the following code snippet:

icon
Related questions
Question
C++
Consider the following code snippet:
int arr[3] [3] = { { 1, 2, 3 }, { 4, 5, 6 }};
int val = arr [0] [2] + arr [2] [0];
cout << val;
What is the output of the given code snippet on execution?
3
4
5
6
Transcribed Image Text:Consider the following code snippet: int arr[3] [3] = { { 1, 2, 3 }, { 4, 5, 6 }}; int val = arr [0] [2] + arr [2] [0]; cout << val; What is the output of the given code snippet on execution? 3 4 5 6
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer