Why does my function not modify the value of variable in a struct in C?

You’re passing a copy of the structure to the function. It returns a copy, but you’re not using the result.

You need to assign the result of the function to the variable.

z1 = spZ(z1);

Leave a Comment