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
Array of variable length in struct

I've created 2 structures to represent images (a pixel and an image one) in C. typedef struct pixel { unsigned char red; …

c arrays struct variable-length-array