Take the 2-minute tour ×  How widely used is alloca in the real
world? Should I teach my students to use alloca when it makes
sense? Or should I teach them never to use it? Coming from a C++
RAII background, the idea of not having to call free manually
sounds promising, especially in functions with multiple exit
points.  share|improve this question  migrated from
stackoverflow.com Oct 25 '11 at 13:58  This question came from
our site for professional and enthusiast programmers.  closed as
primarily opinion-based by gnat, MichaelT, GlenH7, KeithS, Bart
van Ingen Schenau Oct 31 '13 at 9:37   Related:
stackoverflow.com/questions/1018853/… –  delnan Oct 25 '11 at
13:51 Why not teach them C99 VLAs ? –  cnicutar Oct 25 '11 at
13:52 @cnicutar alloca() is implementation-dependent but at
least many implementations return NULL on failure. C99 VLAs have
no way to indicate failure. –  Complicated see bio Oct 25 '11 at
13:53 @sbi: For SO this is an open-ended question that doesn't
really fit the format of what the closers