Will it be precise to say that in
void f() {
int x;
...
}
\"int x;
\" means allocating sizeof(int)
bytes o
It depends on a lot of factor. The compiler can optimize and remove it from the stack, keeping the value in register. etc.
If you compile in debug it certainly does allocate some space in the stack but you never know. This is not specify. The only thing specify is the visibility of the variable and the size and arithmetic on it. Look at the C99 spec for more information.