Date: Mon, 14 Sep 92 17:09:55 CDT From: "George Jetson" To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Is there a limit on the size of automatic variables? I.e., how big is the stack? I wrote the following program: main() { int fung; loop: printf("Enter value for fung: "); scanf("%d",&fung); printf("fung = %d\n",fung); { struct foo { char *x[fung]; int y[fung]; } zeta; printf("sizeof(struct foo) = %d\n",sizeof(struct foo)); printf("sizeof(zeta) = %d\n",sizeof(zeta)); } goto loop; } And merrily entered values for fung. I tried -1 and it said the sizeof was very big indeed. Now, this is all just screwing around, but I do wonder just how much stack one is allowed to allocate... And, what will happen if it is too big? (Can anything bad happen?)