Ask Experts » Software & Apps » Software »

What could be the maximum size of an array in C programming?


Date: 20 Apr 2015   Posted By: Paresh Gujarati     Group: Software & Apps    Category: Software   

I am doing numerical simulation for my doctoral work. I am using C programming for coding purpose. I want to know: What could be the maximum size of an array in C programming? What is the limit of size in one, two and multidimensional array in C? What are the precautions to be taken while defining the size of array in C?

Need programming help with your doctoral work? Get free tutorials from our experts to know how to define and set the size of an array in C programming.


Author: tomcruise    21 Apr 2015      Member Level: Bronze     Points : 2  (Rs 2)    Voting Score: 0

Its depends on your on your system properties if you have a 32 bit operating system, the size of an array is about 2^32 which is almost few hundred GigaByte memory if have a higher Ram than the array it can show you the results else it show you run time error.The size of an array completely depends on your system properties.

Author: Aryan    21 Apr 2015      Member Level: Bronze     Points : 2  (Rs 2)    Voting Score: 0

The minimum limit was raised in the 1999 update to the C standard to be at least 65,535 bytes.
In simple words, it is not possible to say in advance how large an array can be created. It is depend on things like the amount of physical memory installed on the computer and the amount of virtual memory provided by the OS.
On some platforms you can create larger arrays if they are static or dynamic allocation.





Post Answer



You must Sign In to post a response.


Post Answer        





Related Questions
  • Return to Question Index
  • Ask Question to Experts


  • Top Contributors
    TodayLast 7 Daysmore...