uninitialized를 쓰면 그 변수는 메모리에 이미 들어 있는 데이터가 무엇이든 그대로 가리켜요. 바로 그게 uninitialized가 있는 이유예요. 메모리를 지우지도, 초기 기본값을 넣지도 않아요.
여기서는 cell이 우연히 매 반복마다 같은 주소에 있어요. 스택이 동작하는 방식 때문에 늘 이렇게 보일 가능성은 있지만, 거기에 의존하면 안 돼요. 변수 하나가 반복 사이에 계속 살아 있는 게 아니에요.
컴파일러나 코드 생성기는 원한다면 값이 놓이는 위치를 재배치할 수 있어요.
영어에서 번역·원문 보기With uninitialized, the variable refers to memory containing whichever data happens to be there already. That's precisely why uninitialized exists: it neither clears that memory nor assigns an initial default value.
Here, cell coincidentally resides at an identical address on every iteration. The way the stack operates probably makes this behaviour consistently observable, but depending on it would be a mistake. A single variable isn't persisting from one iteration to another.
If it chooses, the compiler / code generator may rearrange where things live.