Why SCANF must use the address of the operator

As the title says, I always want to know why scanf must take the address of the operator (&).
Because C has only “pass-by-value” parameters, to pass a’variable’ to put a value, you must pass its address (or a pointer to the variable).

As the title says, I always want to know why scanf must take the address of the operator (&).

Because C only has “pass -by-value” parameter, so to pass a’variable’ to put a value, you must pass its address (or a pointer to the variable).

Leave a Comment

Your email address will not be published.