As we know, the general variables and arrays inside the function all open memory in the stack area, but the memory in the stack area is limited. When the memory we want to open is large, the compiler will report an error.So how should we deal with it?
We also know that static int a; means that memory is allocated to variable a in the global area. Similarly, after we add static to the array, the system also allocates memory to the array in the global area. The total memory in the global area is relatively large, which generally meets our needs.
As the title: When n*m is larger, this is why static a[n*m]={0}; must be static.
The above brief discussion on the role of static a[n*m]={0}; is all the content I share with you. I hope you can give you a reference and I hope you can support me more.