r/code • u/waozen • Oct 26 '26
C Understanding Variable Length Arrays (VLAs) in C | David Priver
https://www.davidpriver.com/Understanding-VLAs-in-C.html
10
Upvotes
r/code • u/waozen • Oct 26 '26
1
u/tstanisl Oct 27 '26
It is worth adding that the types are the essence of VLAs.
Not how those objects are allocated. One can have VLA on stack:
Or heap, using a pointer to VLA:
Or even use infamous
alloca: