malloced array VS. variable-length-array [duplicate]
No they’re not absolutely the same. While both let you store the same number and type of objects, keep in mind that: You can free() a malloced array, but you can’t free() a variable length array (although it goes out of scope and ceases to exist once the enclosing block is left). In technical jargon, … Read more