title: Is there any limitation on the maximum size of array in c?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3049934/c-programming-why-does-this-large-array-declaration-produce-a-segmentation-faul">C programming, why does this large array declaration produce a segmentation fault?</a>  </p>
  </blockquote>
  
  
  
  <p>I am reading an image in c language but i am unable to do so as my program is stopping in between... after debugging i found that it is due to array size... is there any restriction on maximum size of array? 
  if i declare array of size 1400X1400 everything works fine but if i define array of size  1600X1400 my program stops working... why it is so... is there any limit imposed by compiler or OS on array size? and if so what is solution for this in c.</p>
  
  <pre><code>    unsigned char idata[1400][1400]; //working fine
      unsigned char idata[1600][1400]; //not working
  </code></pre>