Build a function interface before its implementation

Write a complete program whose main appears before the definition of int clamp(int value, int low, int high). clamp returns low when value is below low, high when it is above high, and value otherwise. Put an appropriate prototype before main.

    Read three representable integers value, low and high; reject a failed read or low>high with invalid. Otherwise print original=V bounded=B. The original caller variable must remain unchanged. Explain the declaration, definition, invocation, actual arguments, formal parameters and returned result. Test equality to either endpoint and the low==high case. Do not use pointers to modify the caller.


