yobro97 yobro97 - 2 months ago 15
C Question

Maximum number of elements in a 2D integer array

Is there any limit as to how many elements a

2D integer array
can contain in
C
?

PS : I was expecting there would be some space limitations in declaring an array but could not find any such reference in the internet.

Answer

It depends on your RAM or the memory available for you.

i:e: My program used to crash when I declared a global array a[100000][10000], but this declaration is fine with the system now I have.

Comments