GATE CS 2017, set 2 · Question 2 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Match the following:

(P) static char var;(i) Sequence of memory locations to store addresses
(Q) m = malloc(10); m = NULL;(ii) A variable located in data section of memory
(R) char *ptr[10];(iii) Request to allocate a CPU register to store data
(S) register int var1;(iv) A lost memory which cannot be freed
  1. (A) P → (ii), Q → (iv), R → (i), S → (iii)
  2. (B) P → (ii), Q → (i), R → (iv), S → (iii)
  3. (C) P → (ii), Q → (iv), R → (iii), S → (i)
  4. (D) P → (iii), Q → (iv), R → (i), S → (ii)
Answer

Answer (A)

Answer from the official GATE CS 2017 answer key.

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