Is there a dependency when declaring a variable in a narrower scope?

Viewed 59

I has two variants of the same code:

A:

int i;
while (some condition) {some code}

B:

while (some condition) {
  int i;
  some code
}

Is there some differences in efficiency between A and B? Except fact that we has some free bytes after the while scope in B.

How does the memory model work when creating a new scope?

0 Answers
Related