3 ms·
It's the correct word because you loose information when this happens: the size of the array is 'lost' (for 'fixed' arrays, VLA don't have sizes known by the co
by renox 4y ago
It's the correct word because you loose information when this happens: the size of the array is 'lost' (for 'fixed' arrays, VLA don't have sizes known by the compiler).
- uecker 4y agoWhile the size of the VLA is not (usually) known at compile time, it is part of its type and known at run-time (it is a dependent type). And if you use a pointer to the VLA (and not a decayed pointer), you can recover the size or benefit from run-time bounds checking. int n; char buf[n]; char (*p)[n] = &buf; // non decayed pointer to array sizeof(*p);