Hi, When i run the program below with the array size as 255,the random values are getting stored in the value array correctly.But if I increase the size of the array to 256 only '0's'(zeros) are getting stored at all the locations?How can I overcome this error? is there any limitation for the size of the array in keil? looking for ur help, t.senthil
#include <stdio.h> #include <stdlib.h> #include <LPC22xx.h> void main (void) { unsigned int values [255],i; for (i=0;i<255;i++) values[i]=rand()%100; }
There is no size limitation for an array, however you may need to increase the STACK size in the STARTUP file to store that many values. Take a look to the STARTUP.S file of your application. Reinhard