Question: Modify Program 6.1 so that the elements of the array values are initially set to 0. Use a for loop to perform the initialization. Program

Modify Program 6.1 so that the elements of the array values are initially set to 0. Use a for loop to perform the initialization.

Program 6.1)

#include int main (void) { int values[10]; int index; values[0] = 97; values[2] = -100; values[5] = 350; values[3] = values[0] + values[5]; values[9] = values[5] / 10; values[2]--; for (index = 0; index < 10; index++) printf ("values[%i] = %i ", index, values[index]); return 0 }

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!