s是变量* length *数组,而不是变量初始化数组;它是 也被称为VLA。 在C99中引入了VLA。 C90不支持它们。 如果a没有初始化,任何试图访问它的价值,包括在VLA声明中使用它的都会调用未定义的 行为。 - Keith Thompson(The_Other_Keith) ks***@mib.org < http: //www.ghoti.net/~kst> 圣地亚哥超级计算机中心< *< http://users.sdsc.edu/~kst> 我们必须做点什么。这是事情。因此,我们必须这样做。 s is a variable *length* array, not a variable initialized array; it''salso referred to as a VLA. VLAs were introduced in C99. C90 does not support them. If "a" were not initialized, any attempt to access its value,including using it in a VLA declaration, would invoke undefinedbehavior. --Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>We must do something. This is something. Therefore, we must do this. 这篇关于另一个愚蠢的问题:带变量的数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-25 05:49