ENع
الدرس 06 · Memory

Variables on the stack

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

Every time a function runs, its local variables need somewhere to live. C++ gives each call a stack frame: a block of memory pushed on top of the call stack when the function starts and popped off when it returns. Step through a ten-line program, watch main's frame appear, a call to square push a second frame on top, values get copied in and out, and the frames disappear again, automatically.

10 دقيقة10 خطوات5 أسئلةIntermediate
شكل 6 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.