0
Scope of formal parameters is function scope. Why?
Scope of formal parameters is function scope. Why?
1 Resposta
+ 4
Formal parameters refer to the copy of the actual parameters( values passed to function during calling in main() ) created inside a function.
These values are created when the function is called and all changes are done on them, leaving the original parameters unaffected.
Thus, when the function ends execution, these variables are removed from memory, as they are similar to declaring variables inside a block. Thus, you cannot use them in the rest of your program.