basics · beginner · ~15 min
Mutate caller variables via pointers.
Implement void swap_int(int *a, int *b) swapping the two values through their pointers.
void swap_int(int *a, int *b) {
/* TODO */
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.