Dynamic array allocation on stack in C

前端 未结 3 1926
南旧
南旧 2020-12-06 07:02

I just did a experiment yesterday, and find something confusing:

#include 

int main()
{
    int j;
    scanf(\"%d\",&j);
    const int i          


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-06 07:36

    C has such a feature as Variable Length Arrays. Arrays with automatic storage duration can be defined in the flight.

提交回复
热议问题