Whenever a procedure is executed, its activation record is stored on the…

2021

Whenever a procedure is executed, its activation record is stored on the stack, also known as:

  1. A.

    Access Stack

  2. B.

    Control Stack

  3. C.

    Formal Stack

  4. D.

    Return Stack

  5. E.

    Question not attempted

Attempted by 57 students.

Show answer & explanation

Correct answer: B

When a procedure is called, its activation record (containing parameters, return address, local variables, etc.) is pushed onto a stack. This stack is known as the control stack because it manages the control flow of the program, ensuring that procedures return to the correct point after execution. The control stack is essential for handling nested and recursive procedure calls.

हिन्दी उत्तर: जब कोई प्रोसीजर चलाया जाता है, तो उसका एक्टिवेशन रिकॉर्ड (पैरामीटर, रिटर्न एड्रेस, स्थानीय चर आदि शामिल) स्टैक पर डाला जाता है। इस स्टैक को कंट्रोल स्टैक कहा जाता है क्योंकि यह प्रोग्राम के नियंत्रण प्रवाह का प्रबंधन करता है, यह सुनिश्चित करता है कि प्रोसीजर निष्पादन के बाद सही स्थान पर वापस आए। कंट्रोल स्टैक नेस्टेड और रिकर्सिव प्रोसीजर कॉल्स को संभालने के लिए आवश्यक है।

Explore the full course: Hpsc Pgt Computer Science