Added about statically vs dynamically allocated (#31555)

pull/26438/head^2
Tammy Lee 2019-01-05 09:16:47 -08:00 committed by Christopher McCormack
parent cf06cd9ad9
commit 18b053378d
1 changed files with 2 additions and 0 deletions

View File

@ -108,6 +108,8 @@ int*A=(int*)malloc(sizeof(int)*n);
* Some texts refer to one-dimensional arrays as vectors, two-dimensional arrays as matrices, and use the general term arrays when the number of dimensions is unspecified or unimportant.
* Two types of arrays in C are statically allocated and dynamically allocated. The size and number of dimensions of statically allocated arrays are known at compile time. On the other hand, dynamically allocated are allocated on the heap at run time and require a call to ```malloc```.
## Multi-dimensional Arrays in C