pointers-memory · intermediate · ~15 min
Mutate pointers through pointers-to-pointers.
Implement void swap_ptrs(int **a, int **b) swapping the two pointers (not the values they point to).
void swap_ptrs(int **a, int **b) {
/* TODO */
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.