I dont know if the following is a bug or something I am doing wrong. I have compiled this with Codeblock and MINGW.
The following code:
Code:
#include <stdio.h>
const int EV[17] = {-30,-27-24,-21,-18,-15,-12,-9,-6,-3,0,3,6,9,12,15,18};
const int ET[3] = {1,2,3};
int main(void)
{
int x = 16;
printf("EV[%d] = %d\n",x,EV[x]);
x = 2;
printf("ET[%d] = %d\n",x,ET[x]);
}
is showing this output:
Code:
EV[16] = 0
ET[2] = 3
Why EV[16] is showing 0 and not 18 ??
p.s.: I have also compile this with tcc with the same output.