GATE | GATE-CS-2017 (Set 2) | Question 25

Match the following:

(A) P–>(ii), Q–>(iv), R–>(i), S–>(iii)
(B) P–>(ii), Q–>(i), R–>(iv), S–>(iii)
(C) P–>(ii), Q–>(iv), R–>(iii), S–>(i)
(D) P–>(iii), Q–>(iv), R–>(i), S–>(ii)

Answer: (A)


  • static char var; -> A variable located in data section of memory as it is static in nature
  • m = malloc(10); m = null; ->This is a lost memory which cannot be freed as m=NULL
  • Char *Ptr[10]; -> 10 memory locations of char type are allocated to store addresses
  • register int var1;-> Request to allocate a CPU register to store data

Therefore, Option is A

Refer following articles for details:

Quiz of this Question

My Personal Notes arrow_drop_up