Answer the question
In order to leave comments, you need to log in
Why is it better to pass data through function parameters instead of working with them globally?
I have a C exam tomorrow, and I still can't think of a clear answer to the question why is it better to pass data to a function through parameters than to work with them through the global scope? Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Because the use of parameters ensures the purity of functions, and therefore increases the modularity of the program, reusability, and in some cases even parallelization.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question