Does C Support Variable Length Arrays?
C99 introduced variable length arrays (VLAs) as an extension to the C language. However, the leeway in the wording of the C99 standard has raised the question of whether VLAs are also supported in C .
C and the C Standard
According to the C 11 standard, C is based on the C standard as specified in ISO/IEC 9899:1999. This might suggest that C , including VLAs, encompasses all the facilities of C99.
The Exception
Upon closer examination, it becomes clear that the C 11 standard does not fully adopt VLAs from C99. The introductory text quoted earlier refers specifically to the facilities provided by C. While it mentions additional features introduced in C , it does not explicitly include VLAs.
Conclusion
Despite the similarities between C99 and C , there are subtle differences that affect the availability of certain features. While VLAs are supported in C99, they are not included in C , even though C99 serves as the basis for the C standard.
The above is the detailed content of Does C Support Variable-Length Arrays (VLAs) like C99?. For more information, please follow other related articles on the PHP Chinese website!