Global integer array with No dimension
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What is the concept when we define a global array with no dimension This shows output as 16. #include #include int arr[]; int main(int argc, char *argv[]) { arr[1] = 16; printf("%d\n",arr[1]); system("PAUSE"); return 0; } And even sizeof(arr) doesn't work. Why? 回答1: int arr[]; is a tentative definition there. Clause 6.9.2, paragraph 2 says: A declaration of an identifier for an object that has file scope without an initializer, and without a storage-class specifier or with the storage-class specifier static, constitutes a tentative