You are given a struct SensorData containing three integer fields: x, y, and z.
You are also given a global pointer:
const int* ptr = nullptr;Write a function print_data that:
SensorData object without copying itd.x = 99) results in a compilation errorx y z (space-separated, single line)You must write only the correct function parameter signature and implementation.
Example
Input:
3 4 5Output:
3 4 5
Constraints:
SensorData struct is not allowedprint_data, must not compile:d.x = 99;ptr must point to the original data.x after the function call
Input
3 4 5
Expected Output
3 4 5