Practice ยท 1 of 3
Clamp Through a Pointer
Implement void clamp_to(int *v, int lo, int hi): if *v is below lo set it to lo; above hi set it to hi; otherwise leave it.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Pointer Surgery