This video is made to learn about Difference between Call by Value and Call by Reference in C Programming Language.
This is made by Swap function.
Call by Value : If we call a function in C by passing values of variables as the parameters/arguments to the function then such type of function call is known as Call by value.
Call by Reference : We know that whatever variable we are using in our program, ultimately it is getting stored somewhere in memory. So instead of passing values of variables as parameters to the function, if we pass address of those variables and somehow able to access data contained inside those addresses then we will be able to call functions.
Interestingly, concepts of Pointers provide us the advantage of manipulating addresses.So calling a function by passing addresses of variables as the parameters to the function is known as Call by Reference.
Arguments passed to the function during function call are known as actual arguments and the arguments we use during a function definition are known as formal arguments. For a function call to be valid the type, order and number of actual and formal arguments must always be same.
During call by value method the ‘value’ of each of the actual arguments in the calling function is copied into corresponding formal arguments of the called function. In this method, the changes made to the formal arguments in the called function have no effect on the values of actual arguments in the calling function.
Nesta página do site você pode assistir ao vídeo on-line C Programming Language Tutorial 37 Difference between Call by Value and Call by Reference duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Champion Mahipal 14 Janeiro 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 3,999 vezes e gostou 7 espectadores. Boa visualização!