In modern C++, function signatures communicate ownership intent.
A function that takes ownership of a resource must make that intent explicit in its parameter type.
You are given a program where a buffer is managed by std::unique_ptr.
The buffer must be consumed by a function, meaning ownership transfers to the function and the caller must no longer own it.
Your task is to fix the function API and the call site so that ownership transfer is explicit and correct.
This problem is about API design, not mechanics.
Program Flow:
Nunique_ptr that owns a buffer of N bytesExample Input:
4
10 20 30 40
Example Output:
10 20 30 40
No data Constraints:
N ranges from 1 to 100
Input
4 10 20 30 40
Expected Output
10 20 30 40 No data