Problem passing function argument as reference

guix:
Can someone tell me why the sscanf function (for example) require that we pass referenced parameters with a '&' in front of them, like:

sscanf( str, "%d", val); // doesn't work

sscanf( str, "%d", &val); // work

Because the sscanf function parses data from the provided string and stores it in val. If you don't pass a reference to the variable val, then sscanf has no way of changing the contents of val.