GATEverse
← GATE CSE 2001

Q2.18

MCQ2 marks, −0.5

Consider the following three C functions: [P1][P1] int *g(void) { int x = 10; return (&x); } [P2][P2] int *g(void) { int *px; *px = 10; return px; } [P3][P3] int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; return px; } Which of the above three functions are likely to cause problems with pointers?

Sign in to save attempts.

Loading…