I am new to C programming and trying to understand data types.
I specified following variables:
int nsamples = 10000000;
int n = 32;
int m = 64;
int nrpoinnts = n*m*nsamples+99;
printf("Nr points %d\n",nrpoinnts);
For some reason the printed number is negative. Why is that happening? I tough the value range of nrpoinnts was exceeded, so I checked double. The final result was that I was getting negative value either.