Hi Please help me with answer and explain why is this answer

Hi!

Please help me with answer and explain why is this answer:

int [] num = { 74, 19, 35 };
num[2] = 0;
num[0] = 1;

Question options:

1)

19 19 74

2)

35 35 35

3)

1 19 0

4)

74 19 35

5)

19 19 35

6)

74 19 19

7)

74 2 1

8)

74 35 74

1)

19 19 74

2)

35 35 35

3)

1 19 0

4)

74 19 35

5)

19 19 35

6)

74 19 19

7)

74 2 1

8)

74 35 74

Solution

Answer:

3)

1 19 0

Explanation:

Initially array elements are

int [] num = { 74, 19, 35 };

it means

num[0] = 74;

num[1] = 19;

num[2] = 35;

when we assign elements like following

num[2] = 0;
num[0] = 1;

Now array elements will be

num[0] = 1;

num[1] = 19;

num[2] = 0;

array values will be

3)

1 19 0

3)

1 19 0

Hi! Please help me with answer and explain why is this answer: int [] num = { 74, 19, 35 }; num[2] = 0; num[0] = 1; Question options: 1) 19 19 74 2) 35 35 35 3)
Hi! Please help me with answer and explain why is this answer: int [] num = { 74, 19, 35 }; num[2] = 0; num[0] = 1; Question options: 1) 19 19 74 2) 35 35 35 3)

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site