The most appropriate matching for the following pairs is: X: m = malloc(5); m…
GATE · 2000 · CS · Question 1 subparts
The most appropriate matching for the following pairs is:
X: m = malloc(5); m = NULL; -> 1: using dangling pointers
Y: free(n); n->value = 5; -> 2: using uninitialized pointers
Z: char *p; *p = 'a'; -> 3: lost memory
- A.
X-1, Y-3, Z-2
- B.
X-2, Y-1, Z-3
- C.
X-3, Y-2, Z-1
- D.
X-3, Y-1, Z-2
Attempted by 125 students.
Sign up free to check your answer
Sign up freeLoading lesson…