If you have the following statements: int i j: int ctr = 0; int myArray[2][3]; for (i-0; i<3; i++) for (j=0; j<2; j++) myArray[j [i]- ctr; ++ctr; The value of the element myArray[1][2] after executing the above statements: O 2 O 4 O 5

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question
I need the answer quickly
Q4. *
If you have the following statements:
int i j;
int ctr = 0;
int myArray[2][3];
for (i=0; i<3; i++)
for (j=0; j<2; j++)
{
myArray[ i [ i] = ctr;
++ctr;
The value of the element myArray[1][2] after executing the above statements:
2
4
1
O 5
Transcribed Image Text:Q4. * If you have the following statements: int i j; int ctr = 0; int myArray[2][3]; for (i=0; i<3; i++) for (j=0; j<2; j++) { myArray[ i [ i] = ctr; ++ctr; The value of the element myArray[1][2] after executing the above statements: 2 4 1 O 5
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT