printf command causing a seg fault? [duplicate]
问题 This question already has answers here : Getting a stack overflow exception when declaring a large array (9 answers) Closed 6 years ago . When I try to initialize a large double dimensional character array, it works perfectly fine. But when I add a simple print command, it gives me a segmentation fault. Any ideas as to why this is happening? #include<stdio.h> int main(void) { printf("!"); char f[10000][10000]; } It works fine without the printf command, or even if the printf command prints