Talk:Variable-length array
Appearance
stored where?
i think it is only on stack. but there might be cases where it is on heap due to size or just language way of dealing with ADT's. i ask for i added that it is typycally on stack onto main page. 84.16.123.194 (talk) 20:01, 23 October 2008 (UTC)
- Depends on the language and implementation. In C (C99), it's on the stack, i.e., VLAs can only have
auto
storage class. In COBOL, it's either theWORKING-STORAGE
orFILE
SECTION
s, which are static data areas, or in theLINKAGE
SECTION
, which may be static to another program module or allocated on the heap (e.g., usingEXEC
CICS
GETMAIN
). — Loadmaster (talk) 20:19, 23 October 2008 (UTC)