How can a getter function know if setter function was called?
===

I have written setter and getter APIs for certain members of a struct in C. I want the getter function to be called only if setter API was called. Otherwise, default values should be assigned to the members of the function. Is there a way to find out if the members of struct were assigned values or not?

Thanks!