Skip to main content

Bounds Reporter

Challenge on lesson: Checkpoint: Pointers

Implement void bounds(const int* a, int n, int *mn, int *mx) storing the smallest element into *mn and the largest into *mx (n >= 1), and int pick(const int* p, int alt) returning *p when p is non-NULL else alt.

Difficulty: beginner

Back to lesson: Checkpoint: Pointers