Top "Variable-length-array" questions

A variable length array is an array in C99 and other languages whose size is unknown at compile time; instead, it's determined at runtime.

How does GCC implement variable-length arrays?

How does GCC implement Variable-length arrays (VLAs)? Are such arrays essentially pointers to the dynamically allocated storage such as returned …

c arrays assembly gcc variable-length-array
Variable two dimensional array printing "subscript of pointer to incomplete type" when accessed

I am declaring a two dimensional array as such: char arr[10][10]; arr[0][0] = 'X'; Now I print in debugger; (lldb) po …

c arrays variable-length-array
Correctly allocating multi-dimensional arrays

The intent of this question is to provide a reference about how to correctly allocate multi-dimensional arrays dynamically in C. …

c arrays dynamic-arrays dynamic-allocation variable-length-array