0
what actually happens in call by default value process?
7 Respostas
+ 1
No, defaulted parameters and references are two completely different things.
Defaulted parameters are just giving a parameter a standard value, if not given in the call to the function.
"Call by reference" is a way of passing a parameter. Defaulted parameters can be "call by reference" but they can also be "call by value".
So you see, they are independent of each other. I give you that both things have to do with passing parameters to a function but that's where the similarity ends.
Anyways, your question was about what happens, when a function with default parameters is called. As I assume that you mean the technical details and not just conceptually, I can't tell. I don't know this part of the standard well enough and there is a multitude of options of how a compiler could generate code for it.
0
"Call by value" or "default parameters "?
0
ok
0
"Ok" is not an answer to my question. Which of the both is it? Or is it a third thing you mean?
0
see call by default value is another process and it is allmost same as call by reference.
0
thanks a lot 👍
0
No problem. 🙂