GATE CS 2017 (Afternoon) — Question 2

Programming in CDynamic Memory Allocation & File HandlingMCQ1 mark · −1/3 if wrongMedium

Match the following: List-I (P) static char var; (Q) \(m = \text{malloc}(10); m = \text{NULL};\) (R) char *ptr[10]; (S) register int var1; List-II (i) Sequence of memory locations to store addresses (ii) A variable located in data section of memory (iii) Request to allocate a CPU register to store data (iv) A lost memory which cannot be freed
  1. A
    P \(\rightarrow\) (ii), Q \(\rightarrow\) (iv), R \(\rightarrow\) (i), S \(\rightarrow\) (iii)
  2. B
    P \(\rightarrow\) (ii), Q \(\rightarrow\) (i), R \(\rightarrow\) (iv), S \(\rightarrow\) (iii)
  3. C
    P \(\rightarrow\) (ii), Q \(\rightarrow\) (iv), R \(\rightarrow\) (iii), S \(\rightarrow\) (i)
  4. D
    P \(\rightarrow\) (iii), Q \(\rightarrow\) (iv), R \(\rightarrow\) (i), S \(\rightarrow\) (ii)
Practise the full 2017-AN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAThis week's 10-question challengeSame 10 past-GATE questions for everyone this week — see where you stand.
Practise more on Dynamic Memory Allocation & File HandlingTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group