How do we get the out puts to be 90 92 94 95 how does the


How do we get the out puts to be 90 92 94 95. How does the looping work? Like first its i=0 so 0<4 than 0<4-1 or 0<3 which is true. So do I print the value for hourlyTemp of 0or hourly temp for 4? Please show me how the loops work by writing out the way it processes

#include

int main(void) {

  const int NUM_VALS = 4;

  int hourlyTemp[NUM_VALS];

  int i;

  hourlyTemp[0] = 90;

  hourlyTemp[1] = 92;

  hourlyTemp[2] = 94;

  hourlyTemp[3] = 95;

for (i = 0;i < NUM_VALS;i++){

if(i

printf("%d, ", hourlyTemp[i]);

}

else {

printf("%d", hourlyTemp[i]);

}

}

  printf("n");

  return 0;

}

Solution Preview :

Prepared by a verified Expert
Business Management: How do we get the out puts to be 90 92 94 95 how does the
Reference No:- TGS02931221

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)