Sorry to necro this post, but another thread brought this topic to my attention...
I was under the impression that you cannot declare variables after any statements in a function. However this code compiles and executes...
Code:
#include <stdio.h>
int main()
{
int input;
int x,y,z,zZ;
scanf("%d", &input);
x=y=input;
int table[x][y];
int testVar = 0;
for (z=0; z < input ; z++)
{
for (zZ = 0; zZ < input ; zZ++ )
{
table[z][zZ] = zZ;
}
}
for (z=0; z < input ; z++)
{
for (zZ = 0; zZ < input ; zZ++ )
{
printf("%d",table[z][zZ] = zZ);
}
printf("\n");
}
printf ("%d\n",testVar);
return 0;
}