64. Pointer-ii

Question.6

A function redirects a pointer to a different variable:

void redirect(int **pp, int *new_target) {
   *pp = new_target;
}

int a = 10, b = 20;
int *p = &a;
redirect(&p, &b);
printf("%d", *p);

What is the output?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!