pointers-memory · beginner · ~15 min
Write through an array pointer.
Implement void fill(int *a, int n, int v) setting the first n elements to v.
void fill(int *a, int n, int v) {
/* TODO */
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.