I must be going insane. This is incredibly simple so I am apparently overlooking something:
Here is my code:
int salesarray[20];
scanf("%d",&sales_input);
printf("sales_input is %d",sales_input);
salesarray[i] = sales_input;
printf("salesValue is %d",i,salesarray[i]);
Here is what I will see:
sales_input is 2salesValue is 1
Can anyone explain why my array is not being updated properly? salesValue should be changing to the value 2. Or I am reading it wrong here...