문제

Why are static variables addressed directly while locals are addressed indirectly? I cannot see where the indirection comes from for locals!

도움이 되었습니까?

해결책

In languages that allow functions to be used recursively, locals need to be addressed indirectly (via the stack pointer).

C, however, has also static local variables, hence static and local are not necessarily mutually exclusive concepts.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top