Home > Backend Development > C++ > Does C Support Variable-Length Arrays (VLAs) like C99?

Does C Support Variable-Length Arrays (VLAs) like C99?

Linda Hamilton
Release: 2024-12-14 05:04:09
Original
432 people have browsed it

Does C   Support Variable-Length Arrays (VLAs) like C99?

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template