Question: Which of the following initializes each entry in the array values to 100 if the array is already declared? Assume values is an integer array

Which of the following initializes each entry in the array values to 100 if the array is already declared? Assume values is an integer array of size 15 and i is already declared as an integer.

values = 100;
values[15] = 100;
values[0..15] = 100;
for (i = 0; i < 15; i++) values[i] = 100;
values = 1..100;
values[100] = 15;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!