Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How many rows and columns can an integer (int) two-dimensional array set in C language?
How many rows and columns can an integer (int) two-dimensional array set in C language?
Theoretically, there is no limit. In fact, computers have a physical memory size limit, and integers also have a maximum limit.

If you want to open a large array, you can use dynamic allocation.

As a global quantity, the steady-state array can be enlarged. For example:

# include & ltstdio.h & gt

int a[ 100 1][ 100 1]; //Global Quantity

main(){

a[ 1000][ 1000]= 1000;

printf("%d ",a[ 1000][ 1000]);

Returns 0;

}

If you put it in main(){}, it is a local quantity, and you don't need so many units.