basics · beginner · ~15 min
Two-pointer technique on arrays.
Implement void reverse_array(int *a, size_t n) that reverses a in place.
#include <stddef.h>
void reverse_array(int *a, size_t n) {
/* TODO */
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.