Qualcomm Interview Question

2. Fun() { int *ptr = NULL; load_ptr(&ptr); } Load_ptr(int **ptr) { *ptr = malloc(1024); } This example where double pointer is useful, if don't use double pointer then it would be difficult to assign memory to ptr in load_ptr.