pointers-memory · intermediate · ~15 min

Dereference twice

Follow two levels of indirection.

Challenge

Implement int deref2(int **pp) returning the int reached by dereferencing twice (**pp).

Starter code

int deref2(int **pp) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.