GATE CS 2026, set 2 · Question 17 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

In C runtime environment, which one of the following is stored in heap?

  1. (A) A static variable declared inside a function
  2. (B) An array of integers declared inside a function
  3. (C) A dynamically allocated array of integers created using malloc() function call
  4. (D) Return address of a function
Answer

Answer (C)

Answer from the official GATE CS 2026 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes