pointers-memory · beginner · ~15 min
Write through a pointer with the dereference operator.
Implement void set_via_ptr(int *p, int v) storing v into the int that p points to.
void set_via_ptr(int *p, int v) {
/* TODO */
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.