Please wait...
THANKU FOR BEING A PART OF OUR JOURNEY TO BRING "REVOLUTION IN EDUCATION"
We Genuinely APPRECIATE your PATIENCE

35
M: +1.00/-0.33

Consider the following C code:
# include <stdio.h>
int * assignval (int *x, int val) {
*x = val;
return x;
}
void main ( ) {
int * x= malloc (sizeof (int));
if (NULL = = x) return;
x = assignval (x,0);
if(x) {
x=(int *) malloc (sizeof (int));
if (NULL = = x) return;
x = assignval (x, 10);
}
printf(“%d\n”, *x);
free (x);
}
The code suffers from which one of the following problems:

[GATE CS 2017 Set 1]
A
B
C
D