Consider the following C code: #include 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 ", *x); free(x); The code suffers from which one of the following problems:
Topic-wise GATE CS PYQs with verified steps
