I have study a book of C programming and it shows answer for the question but i cannot get back the answer that show in the book. The output is
Code:
values[0] = 197
values[1] = 0
values[2] = -101
values[3] = 547
values[4] = 0
values[5] = 350
values[6] = 0
values[7] = 0
values[8] = 0
values[9] = 35
The answer for the code to produce the output is
Code:
#include <stdio.h>
int main (void)
{
int values[10];
int index;
values[0] = 197;
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\n", index, values[index]);
return 0;
}
Can someone help me??
I am using the c free standard